/    Sign up×
Community /Pin to ProfileBookmark

Facebook graph: detecting if "log in" is required in order to get info

Hi,
I am using facebook graph API, according to their documentation, I should get error code 464.
[url]https://developers.facebook.com/docs/graph-api/using-graph-api/#errors[/url]

Now I have the following get requerst for the post of the user hsisd:
[url]https://graph.facebook.com/hsisd/posts[/url]

And I get error code 104, that a token is required.
When I use the token of my application:
[url]https://graph.facebook.com/hsisd/posts?access_token=310960802248841%257CTaT9XcCggyWBouZqyBxgtISbj3k[/url]

Then I just get empty data.

That is because a logged in user is required and this is an application token.

Now my question is, is there any way that I can check if a logged in user access_token is required or not?

How do I check it?

Because empty data array can happen due to many reason, how can I detect if this is due to user log in requirement?

to post a comment
Full-stack Developer

0Be the first to comment 😎

×

Success!

Help @WebDeveloperCon spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...