javascript - How to get id or name of a facebook user when it share my link - Stack Overflow

i'm developing a page in with there are many facebook share button. My page has url like: what i l

i'm developing a page in with there are many facebook share button.

My page has url like:

what i like to do is to get info about the user that is sharing my page instead to have

;name=Name%20Surname

so i can put that name in my page like for example:

The user Name Surname has shared this page.. share that page you too!

Is possible? Thanks!!!

i'm developing a page in with there are many facebook share button.

My page has url like: http://mydomain./follow/show_info?id=xxxx

what i like to do is to get info about the user that is sharing my page instead to have

http://mydomain./follow/show_info?id=xxxx&name=Name%20Surname

so i can put that name in my page like for example:

The user Name Surname has shared this page.. share that page you too!

Is possible? Thanks!!!

Share Improve this question asked Sep 21, 2012 at 9:19 JayyrusJayyrus 13.1k41 gold badges135 silver badges215 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 4
FB.api('/me', function(response) {
    alert("Name: "+ response.name + "\nFirst name: "+ response.first_name + "ID: "+response.id);
    var img_link = "http://graph.facebook./"+response.id+"/picture"
});

by this you can extract current logedin user uid and name and image what you have to do when someone triger for share catch these by java script

here are some more link which will help you more

http://developers.facebook./docs/reference/api/user/

http://developers.facebook./docs/reference/javascript/

and

http://developers.facebook./docs/reference/javascript/FB.api/

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745139408a4613358.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信