Facebook Graph API/SDK .NET - Get PageID of a Facebook user

stoph

I have a problem with Facebook Graph API/SDK .NET.
In my Website a user can log in with his Facebook-Account. I only want to have organizers of public Events to log on to this page.
But when a user logs in, I only get information about his own events, and that's the result I don't want. I want to get the evens of the Facebook-Page of a user (pages like clubs, associations, ...)
How can I get (if exists) a Facebook-Page where the logged in user is admin of, so that i can get events of this page?
Must a Facebook-Page have a 'real' user behind it or is it usual that the page is administrated without an admin user? Is there any way to get the information i want?

public ActionResult FBLogin()
{
    var fb = new FacebookClient();
    var loginUrl = fb.GetLoginUrl(new
    {
        client_id = "client_id",
        client_secret = "client_secret",
        redirect_uri = RedirectUri.AbsoluteUri,
        response_type = "code",
        scope = "user_events"
    });

    return Redirect(loginUrl.AbsoluteUri);
}

public ActionResult FBCallback(string code)
{
    var facebook = new FacebookClient();
    dynamic r = facebook.Post("oauth/access_token", new
    {
        client_id = "client_id",
        client_secret = "client_secret",
        redirect_uri = RedirectUri.AbsoluteUri,
        code = code
    });

    var accessToken = r.access_token;
    Session["AccessToken"] = accessToken;
    facebook.AccessToken = accessToken;
    dynamic me = facebook.Get("me/events");
    return null;
}

Thanks a lot!

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Get user birthday Facebook Graph

From Dev

Get tags on user photos facebook graph api

From Dev

Facebook Graph API (How to get user gender?)

From Dev

How to get access to facebook user graph

From Dev

Get user email from facebook in asp net

From Dev

Facebook Graph GET Request

From Dev

Get Facebook User Profile ID instead of App-Scoped user id in Facebook Graph API

From Dev

Get ALL User Friends Using Facebook Graph API - Android

From Dev

PHP Facebook Graph API get posts comments WITH user photo field

From Dev

Get a list of pages a user has in Facebook with Graph API

From Dev

Get Users App-Scoped user id in Facebook Graph API

From Dev

android facebook java get user name with Graph API

From Dev

Get "real" profile URL from Facebook Graph API /user

From Dev

Get Facebook User Email Using Graph API PHP SDK

From Dev

Get the user's profile image in facebook graph v2.2

From Dev

How to get planned events of a user using Facebook Graph API

From Dev

Facebook graph api to get recent feed's by other user

From Dev

Unable to get the current user's friends that use the app facebook graph

From Dev

There is a way to get the feed of an user via the open graph api of facebook?

From Dev

Facebook Graph API - Get user feed posts with pictures

From Dev

Get information for Facebook page in Facebook API graph

From Dev

Get information for Facebook page in Facebook API graph

From Dev

Facebook Graph API stopped sending user email

From Dev

Facebook Graph API - User ID unique?

From Dev

Facebook Graph API only returns user name

From Dev

Facebook Graph API User object subscriptions Whitelisting

From Dev

Facebook Graph API: How to access user movies?

From Dev

Facebook Graph API only returns user name

From Dev

Facebook Graph API Limited User Data Set

Related Related

  1. 1

    Get user birthday Facebook Graph

  2. 2

    Get tags on user photos facebook graph api

  3. 3

    Facebook Graph API (How to get user gender?)

  4. 4

    How to get access to facebook user graph

  5. 5

    Get user email from facebook in asp net

  6. 6

    Facebook Graph GET Request

  7. 7

    Get Facebook User Profile ID instead of App-Scoped user id in Facebook Graph API

  8. 8

    Get ALL User Friends Using Facebook Graph API - Android

  9. 9

    PHP Facebook Graph API get posts comments WITH user photo field

  10. 10

    Get a list of pages a user has in Facebook with Graph API

  11. 11

    Get Users App-Scoped user id in Facebook Graph API

  12. 12

    android facebook java get user name with Graph API

  13. 13

    Get "real" profile URL from Facebook Graph API /user

  14. 14

    Get Facebook User Email Using Graph API PHP SDK

  15. 15

    Get the user's profile image in facebook graph v2.2

  16. 16

    How to get planned events of a user using Facebook Graph API

  17. 17

    Facebook graph api to get recent feed's by other user

  18. 18

    Unable to get the current user's friends that use the app facebook graph

  19. 19

    There is a way to get the feed of an user via the open graph api of facebook?

  20. 20

    Facebook Graph API - Get user feed posts with pictures

  21. 21

    Get information for Facebook page in Facebook API graph

  22. 22

    Get information for Facebook page in Facebook API graph

  23. 23

    Facebook Graph API stopped sending user email

  24. 24

    Facebook Graph API - User ID unique?

  25. 25

    Facebook Graph API only returns user name

  26. 26

    Facebook Graph API User object subscriptions Whitelisting

  27. 27

    Facebook Graph API: How to access user movies?

  28. 28

    Facebook Graph API only returns user name

  29. 29

    Facebook Graph API Limited User Data Set

HotTag

Archive