doutan2228 2014-09-29 14:18
浏览 48

Facebook集成PHP(无需打开Facebook页面)

I am implementing the web service for mobile phone(Like ios, adnroid etc). I dont have login/signup through facebook in my App. But i want to share the data from my App to facebook (and twitter ) as a post. For this, i dont want to redirect user to facebook to enter their credentials on facebook and then share the data. My requirement is get only Username and password from the user save it in DB and call the FB API from my webservice which will check for the authentication of the user credentials (Facebook ) and if correct then it will psot the data / message to user FB wall. I am trying with php for this , but all the libraries and codes available, are going for FB login window.

I know that offline facebook access is removed, but still want to go for it.

Please, one guide me for this. Any code for php or code for mobile (Iphone and Android) will work

  • 写回答

1条回答 默认 最新

  • douyi5157 2014-09-29 14:20
    关注

    You can´t use the api with only username and password, that would be a major security problem. If someone hacks your database > access to all Facebook accounts.

    That being said, you don´t need to authorize a user for sharing, the Facebook docs offer a lot of information about that topic: https://developers.facebook.com/docs/sharing

    You can just use the native share dialogs. For posting without a dialog, you would need to do a lot more things:

    And keep in mind that the message parameter must be 100% user generated, see platform policy: https://developers.facebook.com/policy/

    2.3 Ensure that all content in the user message parameter is entered by the user. Don’t pre-fill. This includes posts, messages, comments, and captions.

    A generated message will not get you through the review process.

    评论

报告相同问题?

悬赏问题

  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 个人网站被恶意大量访问,怎么办
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制