Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it safe to share Facebook API id and secret key?

Tags:

facebook

I am working on an open source web-based application that communicates with Facebook. One of the files contains the Facebook API id and secret key. Is it fine to share this information with the rest of the world?

like image 961
Eyad Fallatah Avatar asked Aug 01 '11 01:08

Eyad Fallatah


1 Answers

It is extremely important that you never share your app secret. Your app ID is completely unimportant and available to anyone who goes to your Facebook apps profile page, but the app secret is a completely different story. It could compromise any data stored within your application and allow third parties to call specific APIs on your behalf without your knowledge. This is bad for you and for your users.

If you have accidentally shared your app secret (this can happen when it's embedded in client binaries or code) then you can reset it really quickly through the Facebook developer app: https://developers.facebook.com/apps goto Settings -> Edit and then click reset beside the app secret. This will have the effect of invalidating any access tokens that have been previously been granted by your app.

like image 92
Matthew Johnston Avatar answered Oct 04 '22 00:10

Matthew Johnston