[英]How to get id or name of a facebook user when it share my link
i'm developing a page in with there are many facebook share button. 我正在开发一个页面,有很多Facebook分享按钮。
My page has url like: http://mydomain.com/follow/show_info?id=xxxx
我的网页有以下网址: http://mydomain.com/follow/show_info?id=xxxx
: http://mydomain.com/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.com/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!!! 谢谢!!!
FB.api('/me', function(response) {
alert("Name: "+ response.name + "\nFirst name: "+ response.first_name + "ID: "+response.id);
var img_link = "http://graph.facebook.com/"+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 通过这个你可以提取当前logedin用户uid和名称和图像你有什么你必须做什么时候有人通过java脚本抓住这些
here are some more link which will help you more 这里有一些更多的链接可以帮到你
http://developers.facebook.com/docs/reference/api/user/ http://developers.facebook.com/docs/reference/api/user/
http://developers.facebook.com/docs/reference/javascript/ http://developers.facebook.com/docs/reference/javascript/
and 和
http://developers.facebook.com/docs/reference/javascript/FB.api/ http://developers.facebook.com/docs/reference/javascript/FB.api/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.