简体   繁体   English

Facebook apprequest链接“错误”

[英]Facebook apprequest Link“wrong”

Im using this Docu and Script to send an app request to some friends. 我正在使用此文档和脚本向一些朋友发送应用请求。

https://developers.facebook.com/docs/reference/dialogs/requests/ https://developers.facebook.com/docs/reference/dialogs/requests/

FB.ui({
    method: 'apprequests',
    message: 'My message',
    max_recipients: 3
}, requestCallback);

Its working fine but if they click the Link in the FB notification bar they dont get linked directly to my page and app. 它工作正常,但如果他们点击FB通知栏中的链接,他们就不会直接链接到我的页面和应用程序。 Instead they are at a "step between". 相反,他们处于“介于两者之间”。 The app is visible in an iframe with less than 810px and no like button (so the design is broken and the like gate cant be deactivated. 该应用程序在iframe中可见,小于810px且没有类似按钮(因此设计被破坏,类似的门无法停用。

This are the link parameters: 这是链接参数:

/?fb_source=notification&request_ids=1234567890&ref=notif&app_request_type=user_to_user&notif_t=app_request

Where is the problem? 问题出在哪儿? Why is FB not linking the user to the app in page directly? 为什么FB没有直接将用户链接到页面中的应用程序?

I guess the solution is somewhere in the App settings maybe... but i dont know. 我想解决方案可能在应用程序设置中的某个地方......但我不知道。

Citing Requests documentation: 引用请求文档:

Accepting a request will direct the user to the Canvas Page URL of the app that sent the Request. 接受请求将引导用户访问发送请求的应用的Canvas页面URL。

That is, once user accept request he will be landed to your application canvas (which is 720 pixels wide). 也就是说,一旦用户接受请求,他将登陆您的应用程序画布(宽度为720像素)。

应用设置截图

This is desired behavior and there are additional arguments passed to Canvas URL to provide details about request. 这是期望的行为,并且还有其他参数传递给Canvas URL以提供有关请求的详细信息。

  • fb_source - indicate where user accepted request from fb_source - 指示用户接受请求的位置
  • request_ids - provide comma separated ids of requests user is accepting request_ids - 提供用户正在接受的请求的逗号分隔ID

Once user landing to your application by accepting request you are free do issue additional redirection to the desired page. 一旦用户通过接受请求登陆您的应用程序,您就可以向所需页面发出额外的重定向。

Check out your app Settings: 查看您的应用设置:

  • Go to: https://developers.facebook.com/apps/ click on you app, and then on edit. 请访问: https//developers.facebook.com/apps/单击您的应用程序,然后进行编辑。
  • Click on advanced on the left 单击左侧的高级
  • Check if you app is not in sandbox mode 检查您的应用是否未处于沙盒模式
  • Check out the canvas settings 查看画布设置

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM