App requests successful, but no notification shown

ぃ、小莉子 提交于 2019-11-26 19:46:28

问题


I am using the normal setup for sending invites through the requests dialogue:

FB.ui(
  {
    method: 'apprequests', 
    message: "Please add me, I am doing the same, thanks!"
  }, 
  function(response) {
   console.log(response);
  }
);

The response is successful, response.to shows multiple ids. So sending these invites works like it should. The problem is that these apprequests are not shown up as notifications like they usually do, instead the only place to find them here.

Has the API changed? Looking for answers has given me no results, though I did find this bug report from February 15th 2013.

Is Facebook just testing yet again, or has the API changed but not the documentation? I am truly grateful for any insights!


回答1:


There's two simple things that might cause that problem.

One is that you application is missing the Canvas. Just add it from the your App panel in Facebook Developers.

The second one - make sure your app is NOT in SandBox Mode. If it is it won't send any notifications. I lost hours before figuring that out and changing the code in all possible ways.

Hope that helps.




回答2:


Its not facebook bug its a problem in your facebook app configuration :

Follow the below configuration and its working like a charm.

You just need to go in to the Facebook developer and select your app and goes in to the setting of your app and click "Add Platform" and select "App On Facebook" and than add canvas url in it. now try to send invitation and it will show the notification.

Thanks Sagar


or go to facebook developers,

Change 111 to your APP ID

-Fedmich




回答3:


This was posted yesterday in facebook bugs site. However, it is still not working for me even though I'm utilizing the exact code that the FB comment is referencing.

I realize this is not complete answer to the question and should be put in the comments. However I am a newbie and don't have enough reputation on StackOverflow to post comments. Emil, could you please let me know if you resolve this issue.




回答4:


Had same issue, I added Secure Canvas URL, etc. But problem was I haven't provided iPhone Store ID inside iOS section in Settings.




回答5:


As of Graph API 2.3, Game requests are only available to games.

As mentioned in Game Requests description, you have to create Facebook Web Games in App Portal, then you will get the notification with Game Request. Not for website anymore.




回答6:


I had to implement facebook ‘apprequests’ instead of the deprecated ‘appinvites’ in an existing cordova app and spent hours debugging.

  • apprequests’ are only available in Facebook Apps categorized as ‘games’.
  • You can send notifications only to platforms (iOS, Android, Facebook web games) that are involved with the facebook app. That means, you will never receive a notification in your browser if you miss ‘facebook web games’ as platform. My expectation was to be notified in the facebook browser app if I was invited from a Mobile app.

  • iOS devices don’t get notifications. In my case, I’ve missed to fill the app store id in the Facebook app platform configuration. After that, notifications appeared instantly.

  • If you like notifications in the fb browser app, you have to add ‘Facebook web games’ (formerly known as ‘canvas’) as plattform.

  • You can save yourself a lot trouble by creating test users in the app role category of your facebook app.



来源:https://stackoverflow.com/questions/16792782/app-requests-successful-but-no-notification-shown

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!