无法使用PHP SDK从Facebook App发送通知

时间:2013-05-03 21:04:05

标签: facebook facebook-graph-api user-interface facebook-php-sdk

I am trying to send Notification to the User , when certain event gets hit .

我使用以下代码发送通知,但我收到错误。请让我知道我在哪里犯了错误

代码:

$fb_response = $facebook->api( '/' . $user_id . '/notifications', 'POST', array( 'access_token' => $facebook->getAppId() . '|' . $facebook->getApiSecret(), 'href' => "My_facebook_app_URL", 'template' => "My Message", ));

错误:

FacebookApiException Object
(
    [result:protected] => Array
        (
            [error] => Array
                (
                    [message] => (#10) Notification send blocked.
                    [type] => OAuthException
                    [code] => 10
                )

        )

    [message:protected] => (#10) Notification send blocked.
    [string:private] => 
    [code:protected] => 0

1 个答案:

答案 0 :(得分:1)

尝试

$facebook->getAppSecret()

而不是

$facebook->getApiSecret()

可能?