2011-01-13 82 views
1

将通知发送给批准我的应用的Facebook用户的朋友的最佳方式是什么?如何使用Facebook API发送通知?

我知道我可以写在朋友的墙上,但有没有另一种方式离开任何一种的通知?

谢谢。

回答

1

根据通知而不是邀请,没有没有更多的选项。正如您在permissions文档页面中看到的,您无法访问朋友的电子邮件。

+0

非常感谢,所以.. Facebook应用程序可以在没有多选对话框的情况下发送邀请吗? – taxman 2011-01-13 11:10:38

0
$notificationdata = array(

    'href'=> 'https://apps.facebook.com/MY_APP/', 

    'access_token'=> $app_token, 

    'template'=> '180 char string as information' 
); 

$sendnotification = $facebook->api('/' . $user_id . '/notifications', 'post', 

$notificationdata);