I am getting different results from different pages in Facebook. I am using the FacebookClient api to pull data from "https://www.facebook.com/PAGE". From that I parse out the ID and create a new URL to pull feeds. For example, https://graph.facebook.com/PAGEID/feed?access_token=xxx. But my first call is failing when I try to get the page data from https://www.facebook.com/capncrunch and ONLY that page. It doesn't return me the page id like in other page requests I do. Oddly I am able to get data via the Graph API explorer but not via the FacebookClient api. What I am doing wrong?
Asked
Active
Viewed 401 times
0
-
'pull data from "https://www.facebook.com/PAGE"'... Should be 'pull data from "https://graph.facebook.com/PAGE_ID?access_token=USER_ACCESS_TOKEN" – 林果皞 Apr 26 '13 at 13:43
-
My URL now is https://graph.facebook.com/capncrunch?access_token=XXX and I get the following error. (GraphMethodException - #100) Unsupported get request. Note, I do not get this on other pages, just this one. – user147372 Apr 26 '13 at 13:49
-
How do I get the page id if I can't call it by name? – user147372 Apr 26 '13 at 13:52
-
The name also works, for example, https://graph.facebook.com/137275109671522 and https://graph.facebook.com/capncrunch?access_token= is same thing. One more thing, the user access token is your account, right? If the answer is yes, do you able to visit https://www.facebook.com/capncrunch ? – 林果皞 Apr 26 '13 at 13:56
-
I created a app (https://developers.facebook.com/apps) and I am using the App ID and App Secret to get my token and I use this same token to pull data from other pages so I know it works. And yes, I am able to view that page in the browser just fine. – user147372 Apr 26 '13 at 14:04
1 Answers
0
You access token is APP ACCESS TOKEN, and the page capncrunch is user restricted. You must use USER ACCESS TOKEN to verify the user is full fill(minimum age, country...etc) the requirement.
Visit
Use Facebook app access_token to get age-restricted Page data through Graph API?
https://developers.facebook.com/docs/opengraph/howtos/user-restrictions/
https://developers.facebook.com/docs/concepts/login/access-tokens-and-types/
for more info
-
-
You mentioned about 'APP Secret' on the final comments, and i realized you've high possibility using app access token. So i tested with my app access token and proved the page is restricted. – 林果皞 Apr 26 '13 at 15:14
-
Excellent, at least I am not going crazy. So to use a User token, I have to bring up a login page via the api and log in, correct? That would suck since this is in a windows service. – user147372 Apr 26 '13 at 15:16
-
You're correct, login page and app authentication page is require to get user access token. – 林果皞 Apr 26 '13 at 15:24