PHP Classes

PHP Social Network Sync: Synchronize post feeds between social networks

Recommend this page to a friend!
  Info   View files Example   View files View files (17)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2022-10-18 (1 month ago) RSS 2.0 feedNot yet rated by the usersTotal: 28 This week: 2All time: 10,659 This week: 349Up
Version License PHP version Categories
social-sync 1.0MIT/X Consortium ...5PHP 5, Web services, Social Networking
Description Author

This package can synchronize post feeds between social networks.

It can use a cloud email service to receive email messages from users that can post to certain social networks.

The cloud email service can receive the messages an process them to deliver to several social networks like Twitter and Facebook.

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

Innovation Award
PHP Programming Innovation award nominee
October 2022
Nominee
Vote
Many sites post content to multiple social networks to get more exposure.

If a single content post needs to be done separately for each social network site, that takes a lot of time for the person posting the content to all the social networks.

This package provides a more automated solution that can take much less time for the person doing the work to post on social networks.

It requires sending a single email message with the content to post to the cloud email service. Then that service can process the content and distribute it to different social networks.

Manuel Lemos
Picture of Chun-Sheng, Li
  Performance   Level  
Name: Chun-Sheng, Li <contact>
Classes: 13 packages by
Country: Taiwan Taiwan
Innovation award
Innovation award
Nominee: 6x

Details

social-sync

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

social website lists

Scenairo

  • 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

Usage

  • 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 https://github.com/peter279k/social-sync.git```.
  • Then download the composer.phar: ```curl -sS https://getcomposer.org/installer | php```.
  • Then install the required packages: ```php composer.phar install```.
  • Create the ```api-key.ini``` in this project root path.
[Facebook]
app_id="facebook_id"
app_secret="facebook_secret"
user_access_token="facebook_user_token"
[Twitter]
api_key="api_key"
[Plurk]
user_name="user_name"
user_password="password"
user_id="user_id"

  • 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

  Files folder image Files  
File Role Description
Files folder imageexamples (5 files)
Files folder imagesrc (1 file, 1 directory)
Accessible without login Plain text file .editorconfig Data Auxiliary data
Accessible without login Plain text file .htaccess Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file receive.php Example Example script

  Files folder image Files  /  examples  
File Role Description
  Accessible without login Plain text file facebook.php Example Example script
  Accessible without login Plain text file facebook_post.php Example Example script
  Accessible without login Plain text file fb_callback.php Example Example script
  Accessible without login Plain text file plurk.php Aux. Auxiliary script
  Accessible without login Plain text file twitter.php Example Example script

  Files folder image Files  /  src  
File Role Description
Files folder imagepeter (1 directory)
  Accessible without login Plain text file autoloader.php Aux. Auxiliary script

  Files folder image Files  /  src  /  peter  
File Role Description
Files folder imagesocial (5 files)

  Files folder image Files  /  src  /  peter  /  social  
File Role Description
  Plain text file Facebook.php Class Class source
  Plain text file Plurk.php Class Class source
  Plain text file PostFeed.php Class Class source
  Plain text file SocialInterface.php Class Class source
  Plain text file Twitter.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:28
This week:2
All time:10,659
This week:349Up