Php 我想要一个facebook共享按钮,在用户';什么是时间线?
我对使用facebook API还不熟悉,但我希望在我的网站上有一个facebook共享按钮,在登录facebook后在用户的时间线上共享特定数据。我已经阅读了一些关于这方面的文档,并在本地主机上创建了一个用于测试的页面。但有一个问题 这一页是,Php 我想要一个facebook共享按钮,在用户';什么是时间线?,php,facebook,facebook-graph-api,Php,Facebook,Facebook Graph Api,我对使用facebook API还不熟悉,但我希望在我的网站上有一个facebook共享按钮,在登录facebook后在用户的时间线上共享特定数据。我已经阅读了一些关于这方面的文档,并在本地主机上创建了一个用于测试的页面。但有一个问题 这一页是, <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<script>
function fbs_click(){
u=location.href;
t=document.title;
d='param kumar';
window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'t='+encodeURIComponent(t)+'&d'+encodeURIComponent(d),'sharer','toolbar=0,status=0,width=626,height=436');
return false;
}
</script>
<body>
<div>
<h2>Some content of my website pages..</h2>
</div>
<div id="fb">
If a tag can have multiple values, just put multiple versions of the same tag on your page. The first tag (from top to bottom) is given preference during conflicts.
<a href="http://www.facebook.com/share.php?u=http://localhost/paramRND/FbShare.php" onclick="return fbs_click()" target="_blank"> Share on FB</a>
</div>
</body>
</html>
无标题文件
函数fbs_click(){
u=location.href;
t=文件标题;
d='param kumar';
打开窗户http://www.facebook.com/sharer.php?u=“+encodeURIComponent(u)+”t=“+encodeURIComponent(t)+”和d“+encodeURIComponent(d),“共享器”,“工具栏=0,状态=0,宽度=626,高度=436”);
返回false;
}
我网站页面的一些内容。。
如果一个标签可以有多个值,只需在页面上放置同一标签的多个版本即可。在冲突期间,将优先选择第一个标记(从上到下)。
但当我点击“在Fb上分享”按钮时,在登录Facebook后,它会显示一个空白页面。
有人能帮我吗。谢谢您的url
//localhost/paramRND/FbShare.php
它不会对它起作用。添加实时url
或
您可以通过使用使本地计算机可访问。您需要(临时)更改应用程序代码/html中使用的一些url,以便链接指向临时域,但至少facebook可以访问您的计算机。您的意思是,如果我尝试对任何实时url进行相同操作。它会工作吗?如果你有正确的代码..或者你可以很容易地在这里创建一个按钮,你被敲打?