views:

450

answers:

3

Hello i have a problem .. i want to get all the feeds from a facebook page using fb graph API without OAuth but i have a problem

https://graph.facebook.com/[page ID]/feed
i get the following response 

{
   "error": {
      "type": "OAuthAccessTokenException",
      "message": "An access token is required to request this resource."
   }
}

while i check another page it gets right response

https://graph.facebook.com/[another page ID]/feed

{
   "data": [
      {
...

why it's asking for an access token for a page ... and it doesn't do that for another page ?

EDIT

i checked the first page Graph call 2 days ago and it was working 100%

A: 

I am not sure whether or not you need OAuth but here is how you can get the access token.

More Resources:

http://developers.facebook.com/docs/api

Sarfraz
A: 

Yes, OAuth is the only supported form of authentication. However, some pages don't require it, such as fan pages (e.g. https://graph.facebook.com/cocacola/feed)

Matthew Flaschen
Thanks for your answer ... so how can i make the fan page accept graph API calls without authentication ?
From.ME.to.YOU
Also .... i have tested that fan page 2 days ago and it was working .. but now .. it doesn't
From.ME.to.YOU
@From, it works for me using just `curl https://graph.facebook.com/cocacola/feed`.
Matthew Flaschen
the coca cola works 100% ... but for my page .. i tested using regular graph API call and it was working ... but today it's not .. what do you think the problem ?
From.ME.to.YOU
I'm not sure, but if you control the page try the privacy options at http://www.facebook.com/help/?faq=12818
Matthew Flaschen
thanks a lot for your help .. but i edit the privacy it will return empty data object not an exception :(
From.ME.to.YOU
+1  A: 

You should always be including an OAuth access token (whether it's a user's, if you're working directly on behalf of a user, or your app's, if you're not doing something in a user's context). Otherwise you might not be able to access all of the things that you should be able to access.

Yuliy