I have a ecommerce webstore using OpenCart with around 2000 products. I have created twitter, goolge+, pinterest and facebook page for this website. With Google moving towards semantic search, all these social signals are increasingly important. Everyday, I have to select one or two products and post on these social media websites. I don't like to do this manually and need to find ways to let a script doing the posting. For facebook page, I can use the APIs for daily auto posting.
When I search for "Facebook PHP SDK for auto posting", there are lots of confusing results, mainly due to code written in different Facebook SDK versions. The documentation from Facebook developers website also quite difficult to understand. However, after reading articles from many websites, trial and error with example codes, finally I am able to do auto posting with Facebook PHP SDK v4 and Graph API v2.2.
Here's my expectations:
1) I want to auto post to Facebook Fan Page as admin.
2) No Login with Facebook required.
3) I want to post product title, product url, and product image, just like normal posting.
4) With 2000++ product listing and still increasing, I want able to auto post three to five items per day. It will take more that one year to post all products from my website.
In part 1 of this article, I will describe how I set up facebook app. In the next article, I will describe the code used to auto post single item to facebook page.