Facebook logout functionality

Hi,
I am working on Facebook interface and having problem.
When i am posting some thing on Facebook it’s working for me. But in another page there is facebook logout button in my app and when I click on that, the facebook logout is not working.
Here is my logout code which I tried.
[lua]
facebook.logout()
[/lua]
and
[lua]
local function listener( event )
if ( “session” == event.type ) then
– upon successful login, immediately logout
if ( “login” == event.phase ) then
facebook.logout( )
end
end
end

– first argument is the app id that you get from Facebook–
facebook.login( “AppId”, listener )
[/lua]

Any help will be appreciated.

Thanks, [import]uid: 75428 topic_id: 36784 reply_id: 336784[/import]

When you say [lua]facebook.logout()[/lua] is not working, what exactly is going wrong? Are you getting an error message? Or is the behavior not matching what you expect it to do?

  • Andrew [import]uid: 109711 topic_id: 36784 reply_id: 145098[/import]

Hi aukStudios thanks for reply.
When I am calling Facebook.logout(), Neither getting any response nor any error message.
It’s seem that the facebook.logout() event is not firing.

In second case, the event calling the Facebook login page and after that facebook logout is not responsive. Means after calling facebook login it’s come in the app.

Thanks, [import]uid: 75428 topic_id: 36784 reply_id: 145140[/import]

When you say [lua]facebook.logout()[/lua] is not working, what exactly is going wrong? Are you getting an error message? Or is the behavior not matching what you expect it to do?

  • Andrew [import]uid: 109711 topic_id: 36784 reply_id: 145098[/import]

Hi aukStudios thanks for reply.
When I am calling Facebook.logout(), Neither getting any response nor any error message.
It’s seem that the facebook.logout() event is not firing.

In second case, the event calling the Facebook login page and after that facebook logout is not responsive. Means after calling facebook login it’s come in the app.

Thanks, [import]uid: 75428 topic_id: 36784 reply_id: 145140[/import]

When you say [lua]facebook.logout()[/lua] is not working, what exactly is going wrong? Are you getting an error message? Or is the behavior not matching what you expect it to do?

  • Andrew [import]uid: 109711 topic_id: 36784 reply_id: 145098[/import]

Hi aukStudios thanks for reply.
When I am calling Facebook.logout(), Neither getting any response nor any error message.
It’s seem that the facebook.logout() event is not firing.

In second case, the event calling the Facebook login page and after that facebook logout is not responsive. Means after calling facebook login it’s come in the app.

Thanks, [import]uid: 75428 topic_id: 36784 reply_id: 145140[/import]

When you say [lua]facebook.logout()[/lua] is not working, what exactly is going wrong? Are you getting an error message? Or is the behavior not matching what you expect it to do?

  • Andrew [import]uid: 109711 topic_id: 36784 reply_id: 145098[/import]

Hi aukStudios thanks for reply.
When I am calling Facebook.logout(), Neither getting any response nor any error message.
It’s seem that the facebook.logout() event is not firing.

In second case, the event calling the Facebook login page and after that facebook logout is not responsive. Means after calling facebook login it’s come in the app.

Thanks, [import]uid: 75428 topic_id: 36784 reply_id: 145140[/import]