Altin
Altin

Reputation: 2245

How can I get the APP SECRET of an application that I created programatically?

I created a FB App programatically using this:

https://www.facebook.com/connect/create_app.php?api_key=APP_ID&name=AP_NAME

now I need to get the APP ACCESS TOKEN that can be retrieved using the following code:

$APPLICATION_ID = "APP_ID";
$APPLICATION_SECRET = "APP_SECRET";

$token_url =    "https://graph.facebook.com/oauth/access_token?" .
                "client_id=" . $APPLICATION_ID .
                "&client_secret=" . $APPLICATION_SECRET .
                "&grant_type=client_credentials";
$app_token = file_get_contents($token_url);

for that, I obviously need to have first the APP_SECRET...

So is there any workaround to get the APP_SECRET of the newly created app?

Upvotes: 0

Views: 1732

Answers (2)

Flavio CF Oliveira
Flavio CF Oliveira

Reputation: 5285

Your AppSecret is used for "security purposes" and should not be retrieved that way.

The Appsecret is used to encrypt and decrypt your requests as defined on oauth handshake mechanisms.

It's not supposed to have "realtime mechanisms via api" to getit: do you realize the security issues that it could generate?

Try to look for the secret_key by other perspective, that's the kind of information that no one whats to have on the wire...

hope helps your Vision/Needs

Upvotes: 2

Igor Parra
Igor Parra

Reputation: 10348

You must go to Facebook Developers and copy both keys:enter image description here

Upvotes: 1

Related Questions