Avoiding error 100: invalid parameter (requires valid redirect URI) in application requests dialog

前端 未结 3 1609
野趣味
野趣味 2021-01-18 11:30

I\'m developing a game for Facebook. I need a way for users to invite others to the game. For that, I use the apprequests dialog. I redirect the user to the dialog URL, whic

相关标签:
3条回答
  • 2021-01-18 12:16

    Try replacing the redirect parameters with redirect_uri

    0 讨论(0)
  • 2021-01-18 12:17

    So, turns out the solution is to use redirect_uri and not to escape the URL to redirect to, so the code I wrote before should read:

    $url = "http://www.facebook.com/dialog/apprequests?app_id=".$id."&message=".urlencode("foobar")."&redirect_uri="."http://some.arbitrary.url.com";
    
    0 讨论(0)
  • 2021-01-18 12:21

    From my experience with this error; facebook gives you same error whatever the parameter which caused the error. my problem that I didn't use encodeURIComponent(contentParam); for all the parameters so any special character in any parameters gave me the above error.

    0 讨论(0)
提交回复
热议问题