Get Photos from Albums - Was working before.

Get Photos from Albums - Was working before.

Hi,

Previously I was getting photos using the code below to first get album ids then get the photos. I can still get a list of albums but I can no longer get the photos listed in the album.
From the documentation it seems I am missing an access token. How can i get this access token from JFBConnect to pass to the photos function getAlbumById?




    function getAlbums ()
    {      
        try {       
        return $this->api('me/albums');   
                         
        }     
        catch (Exception $ex) {
            return array();
        }
    }




    function getAlbumById ($aid)
    {
        try {
            $photos = $this->api($aid.'/photos');         
            return $photos;   
        }
        catch (Exception $ex) {
            return array();
        }
    }

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Get Photos from Albums - Was working before.

I have tried this:

   

Code:

   $params['access_token'] = JFBCFactory::usermap()->getUserAccessToken($userid, 'facebook');

         
         
            $photos = $this->api('/'.$fbuserid.'/photos', $params['access_token']);

But no luck

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Get Photos from Albums - Was working before.

I just read through the photos endpoint documentation from Facebook.

In there, it says:

Permissions
Any valid access token for any photo with public privacy settings.
For any photos uploaded by someone, and any photos in which they have been tagged - A user access token for that person with user_photos permission

If the image is public, you should be able to see it always. If it's a private photo, I'd recommend checking the token you're using in the Access Token Debug Tools to make sure you have the user_photos permission.

I hope that helps, but if not, please let me know!

Thanks,
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
24224 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.
There are 0 guests also viewing this topic
There are 0 users also viewing this topic

Board Info

Board Stats
 
Total Topics:
11734
Total Polls:
0
Total Posts:
49260
Posts today:
4
User Info
 
Total Users:
48031
Newest User:
glewot
Members Online:
1
Guests Online:
1222

Online: 
Vaconi IT
Social Stream
Refer and Earn

Like our extensions? You're not alone! That's why they're used on tens of thousands of websites. Now you can earn 20% of any sale you refer to SourceCoast.com.

We provide excellent documentation, well laid out sales pages and great support. All you need to do is spread the word and we'll take care of the rest.

Learn About Our Affiliate Program