How do I get public feed from facebook without user authentication on a native/Desktop app?

Posted by KronoS on Stack Overflow See other posts from Stack Overflow or by KronoS
Published on 2013-11-08T21:37:08Z Indexed on 2013/11/08 21:53 UTC
Read the original article Hit count: 1778

I'm looking to get publicly available facebook feeds (i.e. Google's facebook page/posts). However instead of forcing the user to sign into their own facebook app, I want to be able to access these posts.

I've looked into using "App Access Tokens" however since my application is a native/Desktop app (iOS, Android, WP8/Win 8) I'm not able to do this. Is there a way to get publicly accessible feeds from facebook without user authentication?

I'm using the Facebook C# SDK to access facebook.

Currently I'm doing the following:

    dynamic tokenInfo = fb.Get(
        String.Format(
            "/oauth/access_token?client_id={0}&client_secret={1}&grant_type=client_credentials",
            FbController.AppId,
            FbController.AppSecret));

    var appAccessToken = (string) tokenInfo.access_token;

    fb = new FacebookClient();
    dynamic response = fb.Get(
        String.Format(
        "/google/posts?access_token={0}",
        appAccessToken));

Problem is that this only works if my application is set to "web" instead of "native/Desktop". I get the following error when running this code and classified app as native/Desktop.

(OAuthException - #15) (#15) Requires session when calling from a desktop app

© Stack Overflow or respective owner

Related posts about facebook

Related posts about c#-4.0