Reputation: 421
I am trying to import some Photos from a Facebook page that I own.
I am following this answer on Stack Overflow, more specifically the Client-Side part.
In the answer 3 steps are suggested.
I skipped the 2nd step , cause I am not sure what to do there and I implemented the code in 3rd step :
FB.api('593959083958735/photos', function(response) {
if(!response || response.error) {
// render error
alert("Noo!!");
} else {
// render photos
alert("Yeah! " + response.status);
}
From here I get the alert "Yeah! undefined"
. The response is always undefined
. I think maybe because I should have done something in the authentication part.
All I am trying to do here , is to import some photos from a public Facebook page. Is this the correct way to do that? If yes why would I need any authentication for it. And what exactly should I do in the authentication part?
Upvotes: 0
Views: 762
Reputation: 96151
From here I get the alert "Yeah! undefined". The response is always undefined. I think maybe because I should have done something in the authentication part.
You are querying the photos from a page, so there is no status
field in the response.
All I am trying to do here , is to import some photos from a public Facebook page. Is this the correct way to do that? If yes why would I need any authentication for it.
You don’t need authentication for that – as you can see here in the Graph API Explorer, you get results even without an access token (after clearing the field). And you can see the structure of the response there as well.
Upvotes: 2