1

I'm doing:

     $checkins = $facebook->api('/me/checkins', 'get');       
      for( $i = 0; $i < count ($checkins['data']); $i ++)
      { //printing the info here
}

And I'm obtaining an array with the checkin id, my id, my name, the id, name and location of the place where I have done the checkin, the application used to do the cheking and the date and time when the checkin was done .. everything but the photos I attached to each checkin ..

Here's an example of the array I'm getting:

Array
(
    [0] => Array
        (
            [id] => 1922426782905
            [from] => Array
                (
                    [name] => Myname
                    [id] => 14111407
                )

            [place] => Array
                (
                    [id] => 167250246640777
                    [name] => Francap
                    [location] => Array
                        (
                            [street] => 39 Main Street
                            [city] => NY
                            [country] => US
                            [zip] => 11036
                            [latitude] => 40.47725
                            [longitude] => -3.67557
                        )

                )

            [application] => Array
                (
                    [name] => Facebook for Android
                    [id] => 350682231728
                )

            [created_time] => 2011-05-16T08:16:57+0000
        )






...}

As you can see there are no photos.

Is there a way to get these photos?

Thanks a ton!

user638009
  • 223
  • 1
  • 9
  • 25

1 Answers1

0

you have to take the extended permission of user_photos. Then you will get the src attribute of those photos also.

Awais Qarni
  • 17,492
  • 24
  • 75
  • 137
  • Thanks Awais, but I've added the user_photos permission and there's no photo or image in the checkins array yet... – user638009 May 16 '11 at 08:27
  • can you tell me the array that you get? – Awais Qarni May 16 '11 at 08:55
  • I've edited my initial post, so you can see the array. Thanks a ton! – user638009 May 16 '11 at 10:26
  • you are using graph api or php sdk? – Awais Qarni May 16 '11 at 11:58
  • I'm using the graph api: $checkins = $facebook->api('/me/checkins', 'get'); – user638009 May 16 '11 at 14:13
  • My dear this is php sdk. Ok tell me one thing that this application was in your list. then you added the extended permission of user_photos. After that when you again login with facebook, did a dialogue ask you to give you the extended permission of user_photos?\ – Awais Qarni May 16 '11 at 16:01
  • Yes it did and I allowed it. And after that I reloaded the page and I edited my initial post and pasted the array I'm getting. Sorry for the lapse, it is php, working with oauth in another project. The $checkins = $facebook->api('/me/checkins', 'get'); is shown in my initial post. Thanks – user638009 May 17 '11 at 09:57
  • @AwaisQarni: Have you been able to get checkin pictures? I'm trying the same thing and can't get the picture attachment to a checkin either through the RoR FbGraph Gem nor through the FB Graph explorer! – T C Aug 16 '12 at 04:32