Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/439.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php “Facebook/Twitter”;例如;纯html中的按钮_Php_Javascript_Html - Fatal编程技术网

Php “Facebook/Twitter”;例如;纯html中的按钮

Php “Facebook/Twitter”;例如;纯html中的按钮,php,javascript,html,Php,Javascript,Html,我正在尝试将共享按钮添加到我的简单网站 可以用纯html制作Facebook的“喜欢”按钮吗 可以用纯html制作一个Twitter“like”按钮吗 从中,将以下内容插入到标记体中: <iframe src="https://www.facebook.com/plugins/like.php?href=YOUR_URL" scrolling="no" frameborder="0" style="border:none; width:450px; height:80

我正在尝试将共享按钮添加到我的简单网站

  • 可以用纯html制作Facebook的“喜欢”按钮吗

  • 可以用纯html制作一个Twitter“like”按钮吗

  • 从中,将以下内容插入到标记体中:

       <iframe src="https://www.facebook.com/plugins/like.php?href=YOUR_URL"
        scrolling="no" frameborder="0"
        style="border:none; width:450px; height:80px"></iframe>
    
    
    
    (请确保关闭iframe标记,并将其保持打开状态。)

    对于twitter(可在网站上找到):

    
    
    这是推特的推荐方式,尽管这样一个简单的链接也可以,如果你想共享一个链接:

    类似,
    http://www.facebook.com/sharer.php?u=
    还允许共享URL


    不使用JavaScript的共享方式可能更多(我记得twitter主页上有一些预设推文文本的功能,但现在找不到)。

    你需要更具体地说明链接“类似facebook”或“类似twitter”@Gareth的原因——我想这意味着一个允许访问者“喜欢”的按钮facebook上的页面或twitter上的“推特”页面。外表上不像“脸谱”或“推特”。哦,对不起!我指的是facebook的“喜欢”链接,人们点击它告诉他们的朋友他们喜欢某个特定的网页,我想…你要求的是“纯HTML”,我认为你的意思是没有JavaScript,但你已经用JavaScript和PHP标记了。你的意思是这样吗?这是一个iframe,他们是使用纯html的一种方式吗?使用facebook共享或类似按钮是不可能的。过去只需使用
    iframe
    中引用的
    src
    就可以实现。然而,新的like完全由AJAX驱动,因此是iframe。你在Facebook这方面运气不好。
    <a href="https://twitter.com/home?status=Enter status message here" 
     title="Click to send this page to Twitter!" target="_blank">Tweet This!</a>