简体   繁体   English

使用图API通过用户ID从Facebook获取用户的创建事件

[英]get user's create events from facebook by user id using graph api

I've developed an mvc 5 based application. 我已经开发了基于mvc 5的应用程序。 What i actually need if i am a normal facebook user and i created some events on my facebook after i login on my developed website then i want that events to display on my website. 如果我是普通的Facebook用户,并且在登录开发的网站后在我的Facebook上创建了一些事件,那么我实际上需要什么,那么我希望这些事件在我的网站上显示。 I set the user_events permission and i get my access_token as my code is below. 我设置了user_events权限,并获得了我的access_token,因为我的代码如下。

var client = new Facebook.FacebookClient(accessToken);
dynamic facebookEvents = client.Get("/v2.8/me/events/created");

but this is only returns owners created events if my appid and my app_secret then it's returning only my created events not returning other users events who's login with facebook on my website. 但这仅在我的appid和app_secret返回所有者创建的事件时,才返回我创建的事件,而不返回其他用户在我的网站上用facebook登录的事件。

If you want to return the events of other users, you have to authorize them with user_events too, and use THEIR user access token with that API call. 如果要返回其他用户的事件,则也必须使用user_events进行授权,并在该API调用中使用THEIR用户访问令牌。

Make sure you know "Login Review" too, most permissions don´t just work for every user without approval: https://developers.facebook.com/docs/facebook-login/review 确保您也知道“登录评论”,大多数权限不会仅对每个用户有效,而无需批准: https : //developers.facebook.com/docs/facebook-login/review

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用Facebook Graph API(C#.net)无法获取所有用户的个人资料信息 - Unable to get all user's profile info, using Facebook Graph API (C# .net) 如何从Facebook Graph Api获取用户电子邮件? - How to get a user email from Facebook Graph Api? 无法通过Facebook Graph API为用户的朋友检索事件/图片 - Unable to retrieve events/pictures for friend of a user through Facebook Graph API 使用 MS Graph API 获取我的用户信息 - Get my user's information using MS Graph API Facebook Graph API/SDK .NET - 获取 Facebook 用户的 PageID - Facebook Graph API/SDK .NET - Get PageID of a Facebook user 如何使用 Microsoft Graph API 从包含嵌套组的组中仅获取用户? - How to get only User's from a Group that contains nested Groups using Microsoft Graph API? MS.Graph api - 如何在“应用程序权限”时获取其他用户的事件 - MS.Graph api - how to get another user's events when 'Application Permission' ASP.NET和Facebook Connect - 如何使用Graph API发布到用户的墙? - ASP.NET & Facebook Connect - How To Post To User's Wall Using Graph API? Facebook图形API无法获取用户公开个人资料 - Facebook graph api can't get user public profile 如何使用Facebook graph API判断用户是否在线? - Using the Facebook graph API how do I tell if a user is online or not?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM