Skip to main content

Posts

Showing posts from 2012

Post on behalf of Facebook Page using Graph API

Assuming someone would like to give your permissions to post on his Facebook Pages :-), you need to do following things: Ask for the publish_stream and manage_pages using Facebook Authentication Dialog Get Page Access Token. Such access token can be retrieved by issuing an HTTP GET to /USER_ID/accounts with the manage_pages permission. This will bring you list of the pages and access tokens of such pages. You also can you /PAGE_ID?fields=access_token request to get access token for specific page. (Reference - https://developers.facebook.com/docs/reference/api/page/) Once you have page access token you will be able to post. Posting can be done using following parameters: curl -F 'access_token={ACCESS_TOKEN}' \ -F 'message={MESSAGE TO POST}' \ https://graph.facebook.com/{PAGE}/feed

Magento API: SOAP vs XML-RPC

Some time ago our company consults to our clients that started working on Facebook Store application that should be able to integrate with Magento. After quick overview of Magento API documentation it was clear that we need to select one of the two API methods provided by Magento - SOAP or XML-RPC. First version of Magento Facebook App was developed with SOAP version of API. And then it starts ... Since application should be able to communicate with different installation of Magento, we've learned a tons of bugs for each major Magento version. After more than half year of fighting with SOAP and become an experts in Magento API bugs, we decided to give a try to XML-RPC. And here was very nice surprise that we already didn't expected from Magento developers :-). Almost no bugs related to Magento installaion ... So for everyone checking Magento API - SOAP vs XMLRPC - the absolute winner is XMLRPC.