在facebook的share.php上传递标题,URL和图像 [英] Passing title, url and image on share.php of facebook

查看:72
本文介绍了在facebook的share.php上传递标题,URL和图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在没有JavaScript的情况下在Facebook上共享标题,图像和描述,只需将这些传递给facebook的share.php. 我在这个网站上有问题的代码开源替代方案添加AddAdd,添加,共享共享社交书签

I want to share title , image and description on facebook without javascript just by passing these to share.php of facebook. I got some code on this site in question Open source alternative to AddThis AddToAny, ShareThis etcfor Social Bookmarking

并且我已经阅读了问题如何传递自定义参数在Facebook分享者链接中

and I have read the question how to pass custom parameter in facebook sharer link

现在,我想结合两个问题.我可以简单地在facebook share.php url中传递图像,标题和描述吗?

Now I want to combine both questions. Can I pass Image, title and description simply in the facebook share.php url

喜欢:

<a class="scmFacebook" href='http://www.facebook.com/sharer.php?s=100&amp;p[title]=<?php echo $title;?>&amp;p[summary]=<?php echo $summary;?>&amp;p[url]=<?php echo $url; ?>&amp;&p[images][0]=<?php echo $image;?>'>Facebook</a>

或 如果我错了,请告诉我正确的目的地.

OR If I am wrong then please show me the right destination.

推荐答案

根据Facebook开发人员的说法( bug ):

According to the facebook developers (bug):

共享者将不再接受自定义参数,facebook将以与url OG meta标签中的帖子相同的方式提取在预览中显示的信息.

The sharer will no longer accept custom parameters and facebook will pull the information that is being displayed in the preview the same way that it would appear on facebook as a post from the url OG meta tags.

  1. 您要么使用共享"按钮-需要Javascript SDK

  1. Either you use the Share Button - requires Javascript SDK

或者,使用最新的共享"对话框-需要只是一个应用程序ID.它具有用于调用共享对话框的直接网址方向方法:

Or, use the latest Share Dialog - requires just an app id. It has a direct url direction method for invoking the share dialog:

https://www.facebook.com/dialog/share?
  app_id={app-id}
  &display=popup
  &href={link-to-share}
  &redirect_uri={redirect-uri}

这篇关于在facebook的share.php上传递标题,URL和图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆