PHP Classes


Recommend this page to a friend!
  Classes of Chun-Sheng, Li   PHP Social Network Sync   Download  
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: PHP Social Network Sync
Synchronize post feeds between social networks
Author: By
Last change:
Date: 7 months ago
Size: 2,465 bytes


Class file image Download


This is the simplest way to sync the feed for the multiple social websites.

social website lists


  • using the e-mail client to send the mail to the cloudmailin address.
  • The web service is to receive the mail and process the contents.
  • The web service will post the feed to the specified social websites after checking the mail content is successful.

Request the Facebook and Twitter developer APP


  • Set the cloudmailin service.
  • Set the ```receive.php``` to the receiving mail endpoint.
  • Visit the ```facebook_user_token.php``` from web browser to get the short-lived user access token and add it in ```api-key.ini```.
  • Refer this link to get the long-lived token.
  • Remember that the Facebook user access token is valid for 60 days.After 60 days, you have to request the new access token from ```facebook_user_token.php```.
  • In order to build the service easily, we use the Composer to manage the required packages.
  • Firstly, clone the repo: ``` git clone```.
  • Then download the composer.phar: ```curl -sS | php```.
  • Then install the required packages: ```php composer.phar install```.
  • Create the ```api-key.ini``` in this project root path.

  • Complete the service building. Have fun!
  • P.S: The PHP program in ```examples``` folder just present the posting feed examples.
  • The socail api lists references

> - Twitter API reference > - Facebook API reference > - Plurk Bot sample code