Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook share - Missing texts

Original Problem

I did some more research, see the info on the bottom of the post. Thanks!

I've an Android app, with Facebook sharing option. I did the sharing part of the app mostly from the tutorial on Fb. Dev. site, see: https://developers.facebook.com/docs/android/share

Here's the actual code:

Request.newMeRequest(session, new Request.GraphUserCallback() {
    @Override
    public void onCompleted(GraphUser user, Response response) {
        Bundle postParams = new Bundle();
        String name = String.format(getResources().getString(R.string.shareFacebook_title), user.getName(), petName);
        String caption = String.format(getResources().getString(R.string.shareFacebook_caption));
        String description = String.format(getResources().getString(R.string.shareFacebook_description), user.getName(), petName, shelterName);
        postParams.putString("name", name);
        postParams.putString("caption", caption);
        postParams.putString("description", description);
        postParams.putString("link", getResources().getString(R.string.shareFacebook_url));
        postParams.putString("picture", petPicUrl);

        Request request = new Request(session, "me/feed", postParams,
                HttpMethod.POST);

        RequestAsyncTask task = new RequestAsyncTask(request);
        task.execute();
    }
}).executeAsync();

My problem is, the shared link does not have all the texts, I put into the bundle. See the pic:

Facebook share

When I run the debugger, and debug into the app, all of the postParams runs fine, and the Bundle have all the texts, but the share looks the same (and does not have all of the texts).
The Bundle throws some unexpected ClassNotFoundExceptions, but I think it's an error in the IDE, see this SO question.

Debugging in the IDE

The missing texts are not the same from all phone. From some phones, the picture missis too, but I'm sure, that the URL is right.

I know, that this worked 2-3 weeks ago, and nobody touched this code until today.

Can you help me, what's causing the problem?
Thanks!

Edit

I've tried the Facebook's Graph API Explorer, to send the same query, and I've got the same result (missing texts, etc).

Here's the query:

The same query from the Graph API Explorer

Is it possible, that the Graph API is wrong/broken? Is it changed in the past few weeks? The status page says, that the API is healthy.

Edit#2

Ok, so if I want to share any link, thoose attributes works. But if I want to share a link to Google Play, the attributes stops working.

like image 739
Nagy Vilmos Avatar asked Nov 10 '14 13:11

Nagy Vilmos


People also ask

Why am I not getting a text from Facebook?

If you've set up Facebook texts but aren't receiving any messages from Facebook: Check to make sure you've selected the notifications you'd like to receive by text message (SMS) by visiting your notifications settings. Try removing your number, then reactivating Facebook texts.

How do you share a text post on Facebook?

Locate the post which you want to share and press the Share button in the bottom-right corner of the post. 2. In the pop-up menu that appears, select Share now if you want to instantly share the post or Share to News Feed if you want more control, including the ability to add descriptive text to the post you shared.


1 Answers

Probably that caused my problem, that the Google Play Store defines the oauth tags in the code, so FB parses that tags instead of my content.

The best solution, I found, was to link to a blank site, where from I redirect my users with JavaScript.

like image 123
Nagy Vilmos Avatar answered Oct 09 '22 00:10

Nagy Vilmos