如何使用facebook php sdk发送电子邮件通知程序?

时间:2011-07-03 23:58:16

标签: facebook-graph-api

1 个答案:

答案 0 :(得分:0)

http://developers.facebook.com/docs/reference/api/message/

编辑: 我现在看到你正在尝试使用PHP SDK。也许类似下面的内容对你有用(在另一个stackoverflow问题上看到这个):

$parameters = array(
    'app_id' => $facebook->getAppId(),
    'to' => $facebookUserId,
    'link' => '(required) The link to send in the message. (??)',
    'redirect_uri' => 'URL_TO_REDIRECT_TO_AFTER_USER_CLICKS_SEND_OR_CANCEL',
    'picture' => 'OPTIONAL_URL_TO_IMG--AUTOGENERATED BY LINK',
    'name' => 'OPTIONAL_NAME_OF_MESSAGE/ARTICLE--AUTOGENERATED BY LINK',
    'description' => 'OPTIONAL_DESCRIPTION_TEXT--AUTOGENERATED BY LINK'
 );
 $url = 'http://www.facebook.com/dialog/send?'.http_build_query($parameters);
 echo '<script type="text/javascript">window.open('.json_encode($url).', "_blank", options, false);</script>';