2012-06-17 87 views
0

我正在使用Facebook的API。查看網站here上的文檔。我是否需要執行modrewrite才能使其工作?

看,你需要通過HTTP POST連接到例如:

https://graph.facebook.com/me/recipebox:cook? 
recipe=http://www.example.com/pumpkinpie.html&access_token=YOUR_ACCESS_TOKEN 

但是,在我的情況下,「配方」(一個真正的美國職棒大聯盟的比賽)有一個鏈接:

http://www.sportannica.com/team.php?team=New York Yankees&year=2012 

我是否需要使用modrewrite使我的鏈接與其在facebook圖形網址中的位置兼容?在URL中有另一個問號會讓事情變得糟糕。

回答

1

可能不是,請嘗試在您爲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'; 
+0

好的,我會試試看。但是,對於$ recipeurl,$ recipeurl發送給我的文件內部,是否需要在其中有打開的圖形標記才能起作用? – Lance

+0

那部分我不知道;先試着看看結果。 – drew010

+0

奇怪。這並沒有給我一個錯誤。所以,我想它解決了我的問題。但是,我注意到它沒有發佈任何東西給我的飼料在FB上。 – Lance

相關問題