Developing an Android App integrated with Facebook.
After registering my app on Facebook, getting authorization etc - I`m able to post text and images to a users timeline. When I open the timeline in a browser - I see the posts displayed correctly. However, when I query the graph with
https://graph.facebook.com/{user id}/feed
the result includes everything of that users timeline, EXCEPT for the posts made by my application.
Any ideas why is this and how can I get the complete feed/the posts made by the application for this user only?
The reason for not seeing the posts made by my App is that they when published, they will belong to the "USER/statuses" node, not "USER/feed" which I had expected. To me, this is rather confusing given that the only object publishing allowed by the Graph API is exactly "USER/feed" and that is the node which I call with my POST request.
Anyhow, upon querying with
https://graph.facebook.com/{user id}/statuses
the application posts are returned accordingly. I make the assumption that a user`s facebook wall combines statuses and posts.
I can not find a reference to any documentation from Facebook on this, if somebody knows of such - please share it.
Related
I try to develop an android app, that displays posts of a public Facebook page and enables logged in users to like these posts.
I tried to use the POST API call /{object-id}/likes, but as of version 2.8 of the Facebook API the documentation says, that ...
... as of Nov 17, 2016 [Facebook] changed the behavior of publishing likes and only support this action with Page Access Tokens.
My first guess is, that Facebook does this to avoid apps from abusing the "like" feature. In my understanding it's only possible to like posts on pages, where the logged in Facebook user also has page access rights (a Page Access Token) to. That seems to be a very restrictive option that impedes the possibility of an app to like posts.
I also tried to use the LikeView (as recommended in the Android sharing documentation), but that seems to only work for external links, which seems to be an Open Graph object. The documentation says:
The Like button can be used to like a Facebook Page or any Open Graph object and can be referenced by URL or ID. [emphasis added by author]
When I use the LikeView on Facebook links, as returned by the /{page-id}/posts (link attribute on returned objects), the web view popup closes immediately after clicking on the LikeView button.
I'm posting this question, because I can't find any suitable information for liking Facebook posts (especially as of v2.8) via a custom Android app, even though (I think) this should be a basic feature because on Facebook liking things is one of the most used features.
Disclaimer: Sorry for not linking to more Facebook documentation references, but because of my reputation I'm not allowed to post more than one link.
You found the relevant info already: It is not possible any more via API.
It was possible up until now, but now they removed it, because it was abused too much.
https://developers.facebook.com/docs/apps/changelog#nov-17th--2016:
Deprecations
The Graph API behavior of POST and DELETE to {object-id}/likes has changed to only be accessible for Page Access Tokens. You can read more about this in our docs.
That means, only liking in the name of a page is still possible; but not any more in the name of a user.
I am developing an Android App and using Facebook Login to let user sign up using their Facebook Accounts.
I am a beginner, so wanted to know how to keep track of user's friends signing up on my application and accordingly push notify both users. I am adding a timeline, so I want to show user posts from his social circle only.
Resolution: We are now considering using Invite Friends in latest version of Facebook Graph API.
Facebook did an update a while back , I dont recall which version of the SDK or Graph API (Graph API 2.0 maybe?) this took effect in but you really cant do that kind of thing anymore. Now when you request the list of friends for the user the user ID for the friend that is returned in that list is now randomly generated and not their real account ID.
So when a friend that was pulled in from another user attempts to login with your app the ID you get for them is entirely different. The only real way to do this would be to then name match really but that is entirely unreliable in most cases.
EDIT
This only behaves this way for games or for using the tagging api. Not for general friends list request.
I'm working with the official facebook sdk and example scene for unity and am sending app requests using : FB.AppRequest() which returns a list of friends to send invites to.
However no matter what I try, I only get a list of friends associated with the app and cannot see any other friends who haven't played the app.
I have even tried setting the 'app_non_user' filter, but this makes no difference.
I have read on the Invitable_Friends api, but am not sure how this would be implemented in the unity sdk.
Any advice would be much appreciated. Thanks
Your app must be approved by Facebook to get people's friends lists beyond people using the app. Look in the developers.facebook.com section to find how to do this. I haven't done this, but a game I worked on needed to do this.
Getting approved involves sending your app and it goes through an approval process.
Here's the relevant bit:
https://developers.facebook.com/docs/apps/faq#invite_to_app
"If your app is a game and has a presence on Facebook Canvas:
You can use the requests Dialog and set filters=app_non_users to filter the dialog to only show people who don't use the app."
I have a designing problem and I don't fully understand facebook instructions.
I'm implementing an android app and I would like to get news from 2 facebook pages (public news).
I know that there is an access token, but I'm not sure how to get it for these 2 pages.
I imagined such solution:
Create my facebook app (Still my app access token is useless in this situation).
Ask clients (these 2 facebook pages) to use my app.
Then I could get their news. (?)
Unfortunately creating facebook app and giving necessary permissions is very time-consuming so I want to make sure that this solution is correct.
Or maybe is there a much better/faster solution?
Thank you for help!
I'm having some problems with facebook integration on my android app. I've looked at the examples that come with the api and i can do the things shown in those ok. But i'm having problems with other things such as getting single sign on to work properly, authentication across multiple activities in the app and loading a facebook page (non-api call) without being asked to log in again.
Anyone have examples that show these?
When making API calls, you usually need to include the access_token parameter that was issued when the user authenticated. This is how facebook knows who you are when you make requests.
Similarly, when loading facebook pages (not using the API), you have to remember to send the cookies Facebook sent when the user logged in. Normally the browser keeps track of these automatically, but in your program or app you might have to handle them manually.
I don't have experience with Android specifically, and I don't know what you're using to load and render facebook pages, but knowing how facebook is keeping track of logged-in users should give you an idea of where to start. A google search or two should get you on your way.
Go to facebook.java class and change package name com.facebook.katana to com.facebook.katanaaa or any one of your own choice. This worked for me .