News Feed
Jobs Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPMaster.com:
Using Facebook's Realtime Updates and Subscription API
August 19, 2013 @ 11:35:47

On PHPMaster.com there's a new tutorial showing you how to use the Facebook API and get real time subscription information and updates using this code as a base.

Facebook's real-time updates allow us to declare our interest in certain information about our users and have Facebook notify us when it changes instead of us continually querying the API. [...] There are of course other uses for real-time updates - and indeed we'll take a look at one in this article: an example application which emails people when others "unfriend" them. (Actually that's not strictly true - it tells you when someone is no longer your "friend" regardless of who did the unfriending.)

He helps you get everything you'll need installed (via Composer) including the Facebook SDK, PHPMailer for emails and Underscore for output handling. The sample interface uses a Slim-based structure (a PHP microframework) to make a callback URL that the Facebook application uses for it's real-time notifications. There's also an endpoint that's called when people allow the application access to their accounts, complete with the redirect URL. They show you how to handle the incoming JSON message from Facebook and how to create the email contents and send it out.

0 comments voice your opinion now!
realtime subscription api notifications tutorial facebook slim

Link: http://phpmaster.com/using-facebooks-realtime-updates-and-subscription-api

blog comments powered by Disqus

Similar Posts

Ryan Gantt's Blog: Horizontal reusability with traits in PHP 5.4

O'Reilly Broadcast: Getting Drupal and mod_security to Play Nicely Together on Red Hat 5.x Servers

PHPFreaks.com: PHP Security

HTMLGoodies.com: PHP Tutorial - Introduction

Toomas Romer's Blog: SoC - Next Release Is Out (Eclipse Plugins in Php)


Community Events











Don't see your event here?
Let us know!


security introduction release application install symfony2 package code series overview hack podcast hhvm language facebook component opinion composer unittest framework

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework