I am using the Facebook API in a C++ application with libcurl.
Logging in works good, I can retrieve some user information after the user has registered my application.
The problem is, when I want to log the user out via
https://www.facebook.com/logout.php?access_token=RETRIEVED_TOKEN&confirm=1&next=http://www.google.com ,
there are still remaining active sessions in my account settings (security).
I don’t want these sessions to remain as the logout should clean these.
How can I smoothly clean those active sessions when logging out?
Do I have to add the APP_ID to the URL?
I found out what was missing in my code: The lib that was encapsulating libcurl to perform requests on facebook wasn’t cleaning up properly.
So the fix was to do curl_easy_cleanup() on my curl handle in the destructor of my session object. Now there are no active sessions on facebook anymore.
While debugging, I found another error in my code concerning curl: If you want to do curl_easy_getinfo(handle, CURLINFO_EFFECTIVE_URL, buf) you MAY NOT delete after the function call as curl holds the buffer.
Furthermore, I don’t have any memory leaks.
Thanks for your help!