public partial class CS : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
FaceBookConnect.API_Key = "309542139130513";
FaceBookConnect.API_Secret = "db5fc4d873c49d1d9ed5b3dcee3d338f";
if (!IsPostBack)
{
string code = Request.QueryString["https://graph.facebook.com/oauth/authorize?"];
if (!string.IsNullOrEmpty(code))
{
string data = FaceBookConnect.Fetch(code, "me/friends");
FaceBookData facebookData = new JavaScriptSerializer().Deserialize<FaceBookData>(data);
foreach (FaceBookUser user in facebookData.Data)
{
user.PictureUrl = string.Format("https://graph.facebook.com/{0}/picture", user.Id);
}
gvFriends.DataSource = facebookData.Data;
gvFriends.DataBind();
}
}
}
protected void btnFetch_Click(object sender, EventArgs e)
{
FaceBookConnect.Authorize("user_photos,friends_photos", Request.Url.AbsoluteUri);
}
}
public class FaceBookData
{
public List<FaceBookUser> Data { get; set; }
}
public class FaceBookUser
{
public string Id { get; set; }
public string Name { get; set; }
public string PictureUrl { get; set; }
}
Then am getting following error.
"error": {
"message": "Invalid redirect_uri: Given URL is not allowed by the Application configuration.",
"type": "OAuthException",
"code": 191
Show me solution as soon as possible.