duanlan4801 2011-12-14 17:41
浏览 50
已采纳

打开图表| 发布动作| 使用PHP代替cURL而不是终端

I am new to the developing with the facebook platform. I'm currently following the tutorial here: http://developers.facebook.com/docs/beta/opengraph/tutorial/

I am at step 4, under "Publish an action".

Where it wants me to copy the code snippet directly into the cURL terminal:

The only problem is while contacting my webhost technical support(1and1), they informed me that I was on a shared hosting plan and that I could not access the terminal directly and I would have to do this through a php script.

I don't know how to do this, can anyone please, please point me in the right direction!!

Here are the instructions facebook gives me:

Publish an Action

Publishing an action connects the user to the object you created. The Open Graph Dashboard page has a 'Get Code' link next to your action. This contains curl code snippets that you can copy into terminal and run directly.

Publishing an action involves making an HTTP POST to the me/[namespace]:[action_type] Graph API endpoint with the following parameters:

[object_type]: a link to a web page representing an object.
access_token: a valid user access_token with publish_actions permissions.

For example, sending a POST to:

https://graph.facebook.com/me/YOUR_NAMESPACE:cook ?recipe=OBJECT_URL&access_token=ACCESS_TOKEN

This will publish a cook action for the recipe corresponding to the provided OBJECT_URL. Replace OBJECT_URL with your web page URL.

  • 写回答

2条回答 默认 最新

  • duanchan5458 2011-12-14 20:11
    关注

    You should be using PHP's built-in cURL support, not terminal calls.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 seatunnel 怎么配置Elasticsearch
  • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
  • ¥15 (标签-MATLAB|关键词-多址)
  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端
  • ¥15 基于PLC的三轴机械手程序
  • ¥15 多址通信方式的抗噪声性能和系统容量对比
  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程