开发者

Facebook publish - what is ogurl?

开发者 https://www.devze.com 2023-02-16 09:18 出处:网络
I am trying to use the sample php code to publish content on my facebook app\'s wall. I took the php sample code form here: http://developers.facebook.com/docs/opengraph/

I am trying to use the sample php code to publish content on my facebook app's wall. I took the php sample code form here: http://developers.facebook.com/docs/opengraph/

I changed the APP_ID and the SECRET but I have no Idea what I need to put in the $ogurl variable and I couldnt find somethign that say what it is..

I assume this is shorten for "Open Graph URL"开发者_运维知识库 but still I dont know what it is or where I can find it.


according to the open graph protocol page,

og:url
   The canonical URL of your object that will be used as its permanent ID
   in the graph

so you have to define whatever URL you want to "define" your object. This url will become the permanent ID of this object in the graph.

Be aware that this url should be "canonical" in the sense that it is what you consider to be the "official and definitive" URL for your content / object.

you can see on the example on the facebook doc that they do :

curl -F 'access_token=...' \
 -F 'message=Hello Likers' \
 -F 'id=http://www.myopengraphpage.com/page1.html' \
 https://graph.facebook.com/feed

where id corresponds to $ogurl in the PHP code. so $ogurl must be the url of your content in the form : $ogurl = "http://www.myopengraphpage.com/page1.html";

0

精彩评论

暂无评论...
验证码 换一张
取 消