Skip to content
This repository was archived by the owner on Jan 13, 2022. It is now read-only.

Adding session_start() to the initialization docs. #236

Merged
merged 1 commit into from
Sep 13, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Adding session_start() to the initialization docs.
Saves lots of troubleshooting (mainly when people are testing the API alone, without any framework or complete setup behind). See http://stackoverflow.com/questions/23522583/facebooksdkexception-session-not-active-could-not-store-state
  • Loading branch information
leonelsr committed Sep 12, 2014
commit f9e322830ea1ac71d42de286a9d119c10940169d
3 changes: 2 additions & 1 deletion docs/sdk_getting_started.fbmd
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ You will need to have configured a Facebook App, which you can obtain from the [
Then, initialize the SDK with your app ID and secret:

~~~
session_start(); // For the Facebook SDK to work correctly, you need to start a PHP session
FacebookSession::setDefaultApplication('YOUR_APP_ID', 'YOUR_APP_SECRET');
~~~
</card>
Expand Down Expand Up @@ -132,4 +133,4 @@ $me = (new FacebookRequest(
~~~~

For more details, see the examples and API reference for all of these classes listed on the [landing page for the Facebook SDK for PHP](/docs/reference/php).
</card>
</card>