Over a million developers have joined DZone.

Facebook (Graph) API Class Using Javascript And PHP. (Page Example).

·
catchCookie();
?>



	
		Facebook Class
	
	
		getUserInfo($Cookie);
				
				// Print the variable (As a test, I suppose?).
				print_r($User);
			} else {
				// The user is either logged out of Facebook, not authenticated to your application, or both. Show the login button :).
				echo $Facebook->loginButton();
			}
			
			// This quickly compiles all the Javascript and DIVS needed to run the FacebookAPI (You can do it yourself, but this makes the code look cleaner).
			$Facebook->Compile();		
		?>
	
Topics:

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}