How to obtain this Facebook user id for the like button?
Referring to the Open Graph protocol, I must implement this strange tag to my website in order to add a like-b开发者_开发百科utton for it.
<meta property="fb:admins" content="USER_ID"/>
USER_ID
is supposed to be replaced by my actual user ID at Facebook. How do I safely obtain the correct user ID?
This user id can be found a few ways: 1) Go to http://graph.facebook.com/you_user_name and you will see JSON data with the id property. 2) Or go to your profile page and you will see a url like this http://www.facebook.com/profile.php?id=12345656. The number after id= is your user id.
You can get a Facebook ID by doing this: http://www.ehow.com/how_5753004_facebook-id.html
Basically, go to your photos and click on one. It will be in the URL bar under fbid.
If you log onto facebook you will see uid=USER_ID in the URL for home, profile etc.
精彩评论