Reputation: 963
To me this seems like it should be a relatively easy task, but I've been unable to have any success with googling for help or figuring it out on my own.
Simply put, I want to pull in a couple images from a specific photo album of a specific page onto that page's website and display them in the sidebar as "Recent Photos On Facebook" or something. This is not a personal facebook account, but a commercial page.
As an additional bit of info, this page is marked as alcohol related. How might this affect the problem and how might I get around any restrictions to the content?
I'm attempting to do this with the PHP SDK but in my attempts to pull:
/<page_id>/albums or
/<album_id>
I'm getting responses like "false" or a json value "data" that is empty.
{ "data": [] }
here's a sample of what I'm trying to do, although I don't even know if I'm on track with this approach:
$facebook = new Facebook(array(
'appId' => '<APPID>',
'secret' => '<SECRET>',
));
$access_token = $facebook->getAccessToken();
$albums = $facebook->api("/<PAGEID>/albums?access_token=".$access_token);
Upvotes: 0
Views: 1161
Reputation: 84170
Try visiting the page you require while not logged into facebook.
If that is the issue then you should create a new facebook account and enable the offline_access permission. With that, your access_token will be permanent and you should be able to pass that through with the request.
Upvotes: 1