duannong1801 2012-09-05 04:15
浏览 31
已采纳

Facebook喜欢按钮和OAuth Access

I am connecting to the Facebook API using HybridAuth on the server side (backend is written in PHP). This is for a SaaS publishing application that is hosted on our servers. I understand the mechanics of OAuth and that once I accquire the appropriate permissions from the user, I can write and read from the Open Graph API, which in theory will allow me to do almost anything.

The problem is that I would like to use some of Facebook's social plugins. In particular, I would like to implement the like button so that it automatically appears for each blog post, article and page.

The problem is that the like button and the various Facebook plugins require an app_id. I would prefer not requiring users to add the developer app to their account and creating an app to get an app_id as it can be a confusing process for non-developers.

Is there anyway we can create or retrieve an app_id from open graph (which we can store and use to generate the like buttons and other facebook widgets)?

With the migrations, I understand that each liked URL will not have it's own page. Once the user clicks a like button on your site, he automatically likes your page. However, let's say I have a page called http://www.mystore.com/products/some-awesome-product and there are other similiar pages, all with a like button. Is it possible that when clicking like, the user automatically likes our Facebook page, but when an item is published in their news feed for the like, the URL links to that specific product? Effectively, is there a way for users to like multiple pages from my site?

Update: It looks like we can generate app_ids programmatically with the create application API in the legacy REST API. However, this does not seem to be an option with the graph API.

  • 写回答

1条回答 默认 最新

  • dongyin8009 2012-09-07 06:43
    关注

    Seems like we cannot programatically create an app_id for an account. This is not an issue, as we will just create a small guide to guide our users through creating an app and submitting the app_id to us using a form. Not perfect, but should be easy to implement.

    As for URLs, liking something will not automatically like your Facebook page. If href is blank, the current page will be liked. If you set your facebook page in the href parameter, then your facebook page will be liked.

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

报告相同问题?

悬赏问题

  • ¥15 win10权限管理,限制普通用户使用删除功能
  • ¥15 minnio内存占用过大,内存没被回收(Windows环境)
  • ¥65 抖音咸鱼付款链接转码支付宝
  • ¥15 ubuntu22.04上安装ursim-3.15.8.106339遇到的问题
  • ¥15 求螺旋焊缝的图像处理
  • ¥15 blast算法(相关搜索:数据库)
  • ¥15 请问有人会紧聚焦相关的matlab知识嘛?
  • ¥15 网络通信安全解决方案
  • ¥50 yalmip+Gurobi
  • ¥20 win10修改放大文本以及缩放与布局后蓝屏无法正常进入桌面