I'm accually asking is it possible to get public wall feeds without auth token? If I'm not logged in to facebook, I can still see the public posts ,this is a good example : http://www.facebook.com/adele I'm using facebook graph API like this:
uri ="https://graph.facebook.com/" + this.getString(R.string.wall_id) + "/feed?access_token="+Utility.mFacebook.getAccessToken();
JSONObject json = GetJSON.fromURL(uri);
If I'm connected to FB I'm successfully get the feeds. Do I need to ask for a new token when I'm offline?
thanx!
You can go to: http://www.facebook.com/feeds/page.php?id=[APP_ID]&format=json For example: Nike Facebook page - http://www.facebook.com/feeds/page.php?id=15087023444&format=json
To find out the APP_ID for a page go to https://graph.facebook.com/[page_name] and in the output you will find it. e.g.: https://graph.facebook.com/nike - "id": "15087023444"
More info here: http://costimuraru.wordpress.com/2011/12/16/facebook-how-to-find-out-a-fan-page-id/
To access feed
connection of user
you need read_stream
permission which automatically means it can't be accessed by unauthorized users.
You can however access posts
connection of user
using any valid access_token
which includes only user's own posts. Accessing it with access_token
other than one for owning user will return only public posts.
You may use application access_token
to access it for unauthorized users.
For pages feed
connection may be accessed the same way, using any valid access_token
BTW, application access_token
may be either in "new format" or old APP_ID|APP_SECRET
format.
Yes you do need an access token, even if the posts are public and you can view the page publicly even if not logged into Facebook.
Most companies do this because if people starting mis using the API they can block people based on the token.
However I want to point out that @Costi Muraru is correct in that you can gather the posts of the page via the feed using the URL they mentioned in their post.
+1 to Costi Muraru on his beautifull posted link :http://www.facebook.com/feeds/page.php?id=15087023444&format=json I thank you for that amigo.
I have found an alternative, I use the following :
uri = "https://graph.facebook.com/search?q=" + wall_id + "&type=post";
Hope this helps anyone
来源:https://stackoverflow.com/questions/9964359/is-it-possible-to-get-the-public-facebook-wall-feeds-when-not-logged-in