---
title: "Connecting to the Facebook API using the Facebook PHP SDK"
description: "When developing web applications, you may need to connect to the Facebook API to gather information or make posts for the user. In this article, we will be teaching you how to connect to the Facebook..."
url: https://www.inmotionhosting.com/support/website/connecting-to-the-facebook-api-using-the-facebook-php-sdk/
date: 2014-09-02
modified: 2021-08-16
author: "Jeff Matson"
categories: ["Website"]
type: post
lang: en
---

# Connecting to the Facebook API using the Facebook PHP SDK

When developing web applications, you may need to connect to the Facebook API to gather information or make posts for the user. In this article, we will be teaching you how to connect to the Facebook API using the Facebook PHP SDK.

**Note**: If you have not already done so, be sure to prepare the SDK on your development environment by following our guide on [obtaining the Facebook SDK](/support/edu/software/setting-up-the-facebook-sdk/).

## Full code example

```
