2011-10-05 48 views
1

我試圖使用HTTP POST請求刪除應用程序請求: https://graph.facebook.com/288041244541781_100000461597474?access_token=AT&method=delete 我使用的訪問令牌來自signed_request對象。如何使用圖形API刪除應用程序請求

但是,這樣做,當我得到這個錯誤:

{ 
    "error": { 
     "message": "(#2) App Request Recipient Must Be Specified: The recipient for this app request must be specified through a user-signed access token or the fully specified app request ID.", 
     "type": "OAuthException" 
    } 
} 

我想我提供的完全指定的應用程序請求ID,但我似乎無法找到有什麼區別一個用戶簽署的之間的訪問令牌和我正在使用的令牌。 我怎樣才能使這個工作?

回答

0

訪問令牌在linter工具中看起來是否正確,並且具有正確的權限?

0
if(isset($_REQUEST['request_ids'])) { 
    $reqs = explode(',', $_REQUEST['request_ids']); 
    foreach($reqs as $req) { 
    $url = "https://graph.facebook.com/".$req."?access_token="; 
    $url .= $facebook->getAccessToken()."&method=delete"; 
    $result = file_get_contents($delete_url); 
    } 
} 
相關問題