Viewers: in countries Watching now:
Learn the basics of building complex, data-driven applications with the Facebook PHP SDK and MySQL. Author Ray Villalobos first introduces the fundamentals, such as checking to see if a user is logged into an application, accessing Facebook user data through the Open Graph API, and making complex API calls with the Graph API Explorer. The course then dives into building an application with API paths and Facebook Query Language (FQL) calls. Along the way, you'll discover how to post to a user's wall, upload photos, integrate with webpages, and more.
Inside the main folder, you'll find a subfolder called SRC. You are going to need to copy these files to your server. I want to create a folder on my server, and I'll call mine php-sdk and move the files there. To bring the SDK's functionality onto your page, we are going to need to add some PHP link in the index.php file to our facebook.php file inside the php-sdk folder. So I'm going to open up my Index file, and I'll add some code to link to the facebook.php file.
You'll need to get your Apps ID and Secret from the Facebook Developers App page. Now here's our viewsource.php, so I'm going to copy this App ID and paste it into the section in the index.php page. I'll also copy the App Secret and paste it into this associative array. My App ID and my App Secret are going to different from yours, so you'll be copying some different code in here. Now this piece of code is going to bring in the Facebook PHP SDK and create a Facebook class for our project.
The Facebook class will be associated with your App ID and your Apps Secret, so I'm going to save this, and I'm going to switch over to my application and just refresh the page. You want to make sure you don't get any PHP errors when you refresh the page, and although this page doesn't do anything, we have successfully downloaded, installed, and connected our page to the Facebook PHP SDK. To make this page useful, we still need to authenticate our users, so we can start gathering data using the Open Graph API.
There are currently no FAQs about Building Facebook Applications with PHP and MySQL.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.