i have config with fb i have enter right aapid and secret id
ImpactWorks.FBGraph.Connector.Facebook facebook = new ImpactWorks.FBGraph.Connector.Facebook();
facebook.AppID = "***********";
facebook.CallBackURL = "http://localhost:4288/Facebook/Default.aspx";
facebook.Secret = "************";
//Setting up the permissions
List<FBPermissions> permissions = new List<FBPermissions>() {
FBPermissions.email, //To get user's email address
FBPermissions.user_about_me, // to read about me
FBPermissions.user_birthday, // Get DOB
FBPermissions.user_education_history, //get education
FBPermissions.user_location, //Location of user
FBPermissions.user_relationships,//relationship status of user
FBPermissions.user_work_history,//Workhistory of user
FBPermissions.user_website,//website entered in fb Profilr
FBPermissions.create_event,
FBPermissions.user_events,
FBPermissions.user_status,
FBPermissions.read_stream,
FBPermissions.friends_events
};
//Pass the permissions object to facebook instance
facebook.Permissions = permissions;
if (String.IsNullOrEmpty(Request.QueryString["code"]))
{
String authLink = facebook.GetAuthorizationLink();
Response.Redirect(authLink);
}
else
{
//Get the code returned by facebook
string Code = Request.QueryString["code"];
//process code for auth token
facebook.GetAccessToken(Code);
//Get User info
FBUser currentUser = facebook.GetLoggedInUserInfo();
//Create IFBEvent object and add all the details
IFBEvent eventDetails = new FBEvent();
eventDetails.EndTime = DateTime.Now.AddDays(2);
eventDetails.StartTime = DateTime.Now.AddDays(1);
eventDetails.Location = "Office";
eventDetails.EventName = "A new secret test event";
eventDetails.Privacy = PrivacyType.SECRET;
var newEventID = facebook.CreateEvent(currentUser.id.GetValueOrDefault(),eventDetails);
I am new to Facebook development..... please can you help or advise the best way of to automaticlly update the the pictures in your website when you update facebook is they a API or.....
mohit11
Member
90 Points
320 Posts
Help using asp.net with facebook events.
Mar 14, 2012 01:16 PM|LINK
i am adding events to face book events with help of url:http://blog.impact-works.com/2011/07/08/creating-events-on-facebook-with-asp-net-c-using-graph-apipart-4/
i have config with fb i have enter right aapid and secret id
ImpactWorks.FBGraph.Connector.Facebook facebook = new ImpactWorks.FBGraph.Connector.Facebook();
facebook.AppID = "***********";
facebook.CallBackURL = "http://localhost:4288/Facebook/Default.aspx";
facebook.Secret = "************";
//Setting up the permissions
List<FBPermissions> permissions = new List<FBPermissions>() {
FBPermissions.email, //To get user's email address
FBPermissions.user_about_me, // to read about me
FBPermissions.user_birthday, // Get DOB
FBPermissions.user_education_history, //get education
FBPermissions.user_location, //Location of user
FBPermissions.user_relationships,//relationship status of user
FBPermissions.user_work_history,//Workhistory of user
FBPermissions.user_website,//website entered in fb Profilr
FBPermissions.create_event,
FBPermissions.user_events,
FBPermissions.user_status,
FBPermissions.read_stream,
FBPermissions.friends_events
};
//Pass the permissions object to facebook instance
facebook.Permissions = permissions;
if (String.IsNullOrEmpty(Request.QueryString["code"]))
{
String authLink = facebook.GetAuthorizationLink();
Response.Redirect(authLink);
}
else
{
//Get the code returned by facebook
string Code = Request.QueryString["code"];
//process code for auth token
facebook.GetAccessToken(Code);
//Get User info
FBUser currentUser = facebook.GetLoggedInUserInfo();
//Create IFBEvent object and add all the details
IFBEvent eventDetails = new FBEvent();
eventDetails.EndTime = DateTime.Now.AddDays(2);
eventDetails.StartTime = DateTime.Now.AddDays(1);
eventDetails.Location = "Office";
eventDetails.EventName = "A new secret test event";
eventDetails.Privacy = PrivacyType.SECRET;
var newEventID = facebook.CreateEvent(currentUser.id.GetValueOrDefault(),eventDetails);
}
but evety time it give appid:241582705854102
and sceret id:3932fdf892c99c1be7576a2d25f357da
wht so it always gives error:
{ "error": { "message": "Error validating application.", "type": "OAuthException", "code": 101 } }Mamba Dai - ...
All-Star
23531 Points
2683 Posts
Microsoft
Re: Help using asp.net with facebook events.
Mar 20, 2012 08:54 AM|LINK
Hi,
Try to determine and modify the values of appid and sceret by debuging step by step.
This reference may be helpful to you:
http://developers.facebook.com/search?path=&selection=OAuthException
Feedback to us
Develop and promote your apps in Windows Store
Kameelp
Member
2 Points
1 Post
Re: Help using asp.net with facebook events.
Jan 03, 2013 10:13 AM|LINK
Hi
I am new to Facebook development..... please can you help or advise the best way of to automaticlly update the the pictures in your website when you update facebook is they a API or.....
Thanks