duanhegn231318 2010-12-21 04:20
浏览 5
已采纳

将FB和Twitter集成到我的评论系统(PHP)的好方法是什么?

There are so many options out there for integration.

At the moment I have comments that are posted on my articles, where a user types in their name and the comment. This is then sent to a moderation queue and displayed when approved.

I want to acheive this:

  • Comment with facebook login (ie facebook account listed as the name w/ avatar)
  • Comment with twitter login (ie twitter account name listed as the name w/ avatar)
  • Push comment from my website to twitter and to facebook

I could go down a few paths as far as I know:

  • Integrate with XFBML, which I don't like because I find it annoying to setup and messy.
  • Integrate facebook comments system, although this can't push to twitter, or allow me to moderate comments from my backend (as far as I can tell i'd have to login under the facebook login for the dev account to moderate the comment)
  • Find a php class that does open auth and integrate with both face book and twitter at once
  • find a pre-created php class

Anyone have a solution that will bias:

a. easy to integrate b. lightweight c. is free

Thanks for your suggestions in advance.

  • 写回答

1条回答 默认 最新

  • douwen5246 2010-12-21 22:51
    关注

    Okay Guys, I caved in and began writing my own simple class. I'm using XFBML but i'm not using the name spaced tag in my doctype, nor am I using xhtml. Those were the two things that bugged me about it. Not sure if this is correct but it is working for me in modern browsers.

    If you are interested, here's my code. http://pastebin.com/qmgpmJYU

    To use it, change your app key and secret (either in the init function or directly in the class).

    Then call facebook::fetch(); just before the end of the body. you can then use facebook::user_info() to detect if a user is logged in, and pop in the login button if they are not.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改
  • ¥20 wireshark抓不到vlan