I am developing a facebook application in asp.net using the facebook developkit downloaded from codeplex.com website.
I 开发者_运维技巧am practicing a sample application in SDK 3.02\samples\IFrame.
They have give an attribute called RequiredAttribute = true
in IFrameMaster.Master.cs
, which will access the basic information.
But I want to request for extended permission in the same screen itself. For that i have used this.
RequiredPermissions = new List<Facebook.Schema.Enums.ExtendedPermissions>() {
Facebook.Schema.Enums.ExtendedPermissions.publish_stream,
Facebook.Schema.Enums.ExtendedPermissions.offline_access };
But there is no use.
Is there any way to do it.
Thanks Guys, Rakhy_Rakey.
Make sure you're setting your required permissions in the page class's constructor. Otherwise, I see no issue with your code.
Keep in mind that this Toolkit SDK has not been updated since April of 2010. And Facebook has made MANY changes since then. So I'd consider this project all but abandoned, perhaps resulting in things you expect to work not working.
However, you may want to look into this Facebook C# SDK, which looks very promising (with the last stable build coming at the end of October 2010).
I set the required permissions in the page class constructor. This is code:
using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using Facebook; using Facebook.Web; using System.Collections.Generic; using Facebook.Schema; namespace IFrameSample { public partial class IFrameMaster : Facebook.Web.CanvasIFrameMasterPage {
public IFrameMaster()
{
this.RequiredPermissions = new List<Facebook.Schema.Enums.ExtendedPermissions>() { Facebook.Schema.Enums.ExtendedPermissions.publish_stream, Facebook.Schema.Enums.ExtendedPermissions.offline_access };
this.RequireLogin = true;
}
}
}
The above code is in IFrameMaster.Master.cs. When I run the code, it is asking for only basic permissions, but it is not asking for extended permi
精彩评论