achmed
achmed

Reputation: 1

get the userid in facebook graph

I am working on facebook iframe application in asp.net c# I succeed to retrive the access_token.

Now I want to pull for example the user likes but I don't have the user id

https://graph.facebook.com/XXXXXX/likes?access_token=ACCESS_TOKEN

How can I get the userid?

Thank you all.

Upvotes: 0

Views: 1055

Answers (1)

DarkFlib
DarkFlib

Reputation: 51

There is a special user 'me' that can be used to get info on the current logged in user.

ie

print_r($facebook->api('/me/likes'));

Array
(
    [data] => Array
        (
            [0] => Array
                (
                    [name] => PuTTY
                    [category] => Technology
                    [id] => 29031951343
                )

            [1] => Array
                (
                    [name] => StumbleUpon
                    [category] => Technology
                    [id] => 6129039822
                )

.
.
.
)
)

Upvotes: 1

Related Questions