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

Commit f9e3228

Browse files
committed
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
1 parent 3f53955 commit f9e3228

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/sdk_getting_started.fbmd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ You will need to have configured a Facebook App, which you can obtain from the [
4242
Then, initialize the SDK with your app ID and secret:
4343

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

134135
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).
135-
</card>
136+
</card>

0 commit comments

Comments
 (0)