I am new on iOS Facebook sdk. I am using version version 3.1.1. I can reach my profile's information via sdk. But I am wondering How can I access and read from other user's public timeline? I search on web but I couldn't find anything. Thanks for answers
All roads lead to Rome.
You can find other users' IDs by many ways on quite any API objects (likes and comments from photos and posts of friends or pages).
Example of a request that gets many users, from a Facebook page post:
https://graph.facebook.com/20531316728_107148006126775?fields=likes.fields(id)
At Facebook, you have a USER_ID and an alias. You can get the alias by accessing their public profile.
For example- https://www.facebook.com/shireesh.asthana which gives you the alias shireesh.asthana
Now you can get the actual User_Id by going to:
https://graph.facebook.com/shireesh.asthana
which gives you my User_id as 631951716
Now you can just do a GET request on 631951716/feed which will help you get the posts of that user(which of course you can see as a non friend).
Hope that helps!
Related
I am developing a MVC project where I am trying to get the user id or user name from the facebook by using the email id provided by the user,
actually i want to fetch the photo of the user, which can be done using
graph.facebook.com/user_id|user_name/picture
where as i have only have the user email id.
with a little surfing on net i found that user name or user id can be fetched by using
graph.facebook.com/search?q=emailAddress&type=user&access_token=ACCESSTOKEN
but i was not able to get the access_token.
Also referred
developer facebook page
and also this
Any help or direction to work will help indeed.
Basically i understand that i need a access token to get the details.
So how do i do this in my MVC application
As you can read in the Search API docs, you can only search for Users by name, but not by E-Mail. It may have been possible in the past, but it is definitely not possible anymore.
Also, for searching by name, you need to use a User Access Token. You only get one by authorizing a User: https://developers.facebook.com/docs/facebook-login
Is there an alternative to allowing the permissions of some sort rather then 'read_stream' permission in Facebook, for a user to read or an app pull their Facebook feed or home feed?
It's very hard, if at all, for Facebook to approve the 'read_stream' permission, so I'm looking for an alternative steps to still allow for our users to pull their favorite stories in our rails app. Any suggestions?
There is no alternative. You can use user_status to get the status posts of the authorized user with /me/statuses.
Btw, it´s not only "hard" to get read_stream approved, it´s nearly impossible ;) - but for very good reasons. Apps should not get access to posts of users who did not even authorize the App.
edit: There is also user_posts now, as replacement for read_stream: https://developers.facebook.com/docs/apps/changelog#v2_3_new_features
Did some investigation. And it is possible.
Instead of the feed you need to access the endpoint /me/posts
This API is accessible with either read_stream or user_posts permission.
https://developers.facebook.com/docs/facebook-login/permissions/v2.3#reference-user_posts
See here for more information:
https://developers.facebook.com/docs/graph-api/reference/v2.3/user/feed
It is quite hidden, but if you know where to look you can find the docs.
I have an app that posts a message to a person's Facebook Timeline / wall.
Is there a way to disable commenting or likes on that post via the Graph API?
No that's not possible with graph api!
You can only disable commenting for a post if the end user is a 'page' or public profile, but not if posting to a normal user.
No - whether or not a post can be liked or commented on is determined by the privacy settings of the user who posted the content - for example, you may not be able to comment on posts in a Group, even if the posts are visible to you, because the Group admin has selected to only allow members to interact with content there.
Similar restrictions are in place for user profiles (allowing comments on content posted to a user's timeline) and pages (e.g. only fans of the page can comment).
There is no way to make a post and have an option or parameter on that specific post which prevents Likes, comments, sharing, etc for that content.
I want to Scan Facebook friends list and find potential relationship between Facebook user and potential friend.After login I will give a user id then the system should find out the whether he is a friend any of my friend or friend's friend.Loop friend’s friend list up to 3 levels. If there are matches present data in hierarchical format.My application was in Asp.net mvc3. Can you please suggest me a solution .
You need user_relationships permission for your needs , Refer this documentation https://developers.facebook.com/docs/reference/login/user-friend-permissions/
I have a signup form, and I wanted to make it so that they have the option of recommending this signup to all their friends in facebook.
Is there a rails API/gem for doing this?
Is there an appropriate name for this?
Thanks!
Looking at the Extended permissions documentation, you don't get access to the email addresses of a Facebook user's friends (search for email and note the second column reads not available). If that's what you're trying to achieve, it's almost certainly not possible, without the user contacting each friend and asking them to visit your app (which I would imagine would have quite a low take-up, if only through inertia).
I guess you have two options:
popup a javascript before submitting the form to prompt the user wether he wants to share it with friends. You will use the js api http://github.com/facebook/connect-js (see the dialog section). This solution would avoid doing server side connection to the facebook api
Have a look a the Facebooker gem to do a stream_publish