开发者

Can I make a Facebook app that only I can use?

I want to make a simple Facebook app that will update my status.

I specifically don't want anyone else to be able to use it, it's really only for updating my statuses.

How can I make such an app? It sounds very simple in theory, but if I make an app in http://www.facebook.com/developers , it seems it can be then used by a开发者_如何学Gonyone on Facebook.


A proper way of doing this to avoid others getting to your app in different ways, would be to check every time the app loads the ID of the logged in user. If that ID is yours then you are fine, else don't allow access to your app (eg. redirect them to facebook homepage).

Example in php:

define('MY_ID', 'XXX');   

// let's say $session holds the current session
if ($session['uid'] != MY_ID) {
    header('Location: http://www.facebook.com');
    exit();
} else {
   // do specific app operations here
}


Just don't hand out your app to anyone? It can be a web app on a page only you have access to, or a desktop app only you have or whatever.


Nevermind, I found it at Advanced menu in Developer site

under Sandbox Mode - If enabled, only the developers of your app will be able to sign in to your app.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜