>我正在使用facebook api。在此处查看网站上的文档。
查看您需要通过 http post 连接到的示例:
https://graph.facebook.com/me/recipebox:cook?
recipe=http://www.example.com/pumpkinpie.html&access_token=YOUR_ACCESS_TOKEN
但是,就我而言,"食谱"(实际上是MLB游戏)有一个链接:
http://www.sportannica.com/team.php?team=New York Yankees&year=2012
我是否需要使用 modrewrite 来使我的链接与其在 facebook 图形 URL 中的位置兼容? 在URL中有一个问号有点搞砸了。
可能不是,请尝试在为 recipe
参数传递的 URL 上使用 urlencode。
$recipeurl = 'http://www.sportannica.com/team.php?team=New York Yankees&year=2012';
$url = 'https://graph.facebook.com/me/recipebox:cook?recipe=' .
urlencode($recipeurl) . '&access_token=1234';