0

我正在使用 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 中有另一个问号有点搞砸了。

4

1 回答 1

1

可能不是,尝试在您为参数传递的 URL 上使用urlencode 。recipe

$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';
于 2012-06-17T06:54:49.010 回答