NextScripts Facebook API library for WordPress and PHP
NextScripts Autoposting API for Facebook allows you to share your texts, images and links to Facebook Profiles, Pages and Groups.
New API library from NextScripts can automatically share texts, images and links to Facebook.
NextScripts API for Facebook could post to:
- Facebook Profiles
- Facebook Business Pages
- Facebook Community Pages
- Public Groups
- Closed Groups
- Secret Groups
What is it? I thought Facebook has its own free native API!
Not anymore. Facebook had a free native API since 2010. it was working perfectly fine up until the summer of 2017 when Facebook made it much more complicated to setup and use. After that it all went downhill pretty fast. Every month Facebook was messing up its API more and more. Facebook disabled an ability to post to groups on March 10 2018, then Facebook disabled an ability to post to profiles on April 25 2018. Finally, Facebook closed an unrestricted access to its native API on May 1, 2018.
It was time for an alternative.
How to use it – WordPress:
It’s very easy to configure NextScripts API for Facebook in WordPress plugin. All you need is to get user id and session id from your browser. You will be able to select where to post (profile, page or group) from the list. Please see the detailed instructions here: NextScripts API for Facebook Configuration
How to use it – PHP: Let’s see some code:
Share a link to Facebook profile:
$cName = ‘YourFBCName’;
$SessionID = ‘YourFBSessionID’;
$message = array(
‘pText’ => ‘Post this to Facebook’,
‘url’ => ‘http://www.YourWebsiteURL.com/’
$nt = new nxsAPI_FB();
$nt->sid = array(‘cn’=>$cName, ‘xs’=>$SessionID);
$result = $nt->post($whereToPost, $message);
if (!empty($result) && is_array($result) && !empty($result[‘post_url’]))
echo ‘<a target=”_blank” href=”‘.$result[‘post_url’].'”>New Post</a>’;
echo “<pre>”.print_r($result, true).”</pre>”;
Get SNAP API
Facebook API is a part of NextScripts Premium and Universal API packages.
NextScripts Premium API for WordPress and PHP provides an ability to autopost to social networks without native built-in APIs.
NextScripts Universal API for PHP provides a unified API interface for autoposting to more then 25 different social networks including Google+, Pinterest, Flipboard, Reddit, YouTube, Blogger, and LinkedIn Company Pages as well as Facebook, Twitter, Tumblr, Flickr, ScoopIt and many others.
PHP Ver > 5.2 (PHP 7 or 7.1 is recommended)
PHP should have at least 32M of memory (64M and more is highly recommended).
gzip and mbstring are not required but will make things work faster.
NextScripts Premium API for WordPress
SNAP Pro Plugin for WordPress is included with NextScripts Premium API for WordPress order.
NextScripts Premium API for PHP
Autopost to social networks without native built-in APIs: Facebook, Instagram, Google+, Pinterest, Reddit, Flipboard, ScoopIt.