How to verify a users facebook id when making ajax posts to php in facebook app

后端 未结 2 805
长情又很酷
长情又很酷 2021-01-28 11:34

I am looking for a way to verify a users facebook id when posting user specific data using ajax.

I want to be able to verify that a facebook user id is correct when post

2条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-28 11:54

    In the end my solution was to grab the users facebook id via the php sdk and creating a hash of it by adding a salt and encoding it with md5. When posting the form I include both the facebook id and the hash. I can then use the same salt value to double check that the facebook idea is correct before using it. This seems to provide enough security for my needs.

提交回复
热议问题