Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
606 views
in Technique[技术] by (71.8m points)

php - How to pass a parameter like title, summary and image in a Facebook sharer URL

Question:

I need to pass my content like title, summary and image in a Facebook sharer URL like this:

 <a id="button"
    href="http://www.facebook.com/sharer.php?
    s=100
    &p[url]=http://myurl.com/overview/sap-talent
    &p[images][0]=http://myurl/images/my_image.png
    &p[title]=mytitle
    &p[summary]=containsummary">

The problem is it's automatically getting some content from the above mentioned URL (http://myurl.com/overview/sap-talent), and I don't know where my title and summary data are gone. Is there another way to share my custom title, summary and image via facebooksharer.php?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Looks like Facebook disabled passing parameters to the sharer.

We have changed the behavior of the sharer plugin to be consistent with other plugins and features on our platform.

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.

Here's the URL to the post: https://developers.facebook.com/x/bugs/357750474364812/


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...