FB.login with PHP API

后端 未结 3 2142
情书的邮戳
情书的邮戳 2021-01-13 09:10

I\'ve set up a Canvas Page which doe\'s a FB.login on click of a form submit button. During the following request it tries to access the users data via $facebook->api(\'/me\

3条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-13 09:48

    I liked Conor's answer as I had to pass my access token from the client side to server side as it was not working in Safari (cookie issues I presume). But this is an old question so a few things had to change. The vars are different now and as oliland pointed out we shouldn't be sending access tokens as GET params.

    Anyway, here's what I ended up with in case it helps anyone

    Start
    

    and then in the PHP, pretty much same as Conor's answer, but getting the token from the $_POST var.

提交回复
热议问题