Hi
I have a gridview in which there is a button on clicking it
I am posting images and text on face book when i post content on facebook with say (facebook account 1) the post is getting posted on the wall successfully
on that account
Then i log out from that account
Again i click on that button (I am signing in with my other facebook account) and trying to send content to the facebook it is not getting posted on that account it is getting posted on the previous facebook account
If i post from my first account and then if i restart my solution and then again if i sent post from different Facebook account it is getting posted sucessfully on that diffrent account
Here is my code
protected void Page_Load(object sender, EventArgs e)
{
try
{
FaceBookConnect.API_Key = ConfigurationManager.AppSettings["Fkey"].ToString();
FaceBookConnect.API_Secret = ConfigurationManager.AppSettings["FSECRET"].ToString();
if (!IsPostBack)
{
string code = Request.QueryString["code"];
ViewState["code"] = Request.QueryString["code"];
#region facebook code for posting onthe wall
if (!string.IsNullOrEmpty(code))
{
Dictionary<string, string> data = new Dictionary<string, string>();
data.Add("link", "http://www.codeproject.com/Articles/122379/MonitorRouterIP");
data.Add("picture", Session["ImagePath"].ToString());
data.Add("caption", "");
data.Add("name", "");
data.Add("message", "test");
FaceBookConnect.Post(ViewState["code"].ToString(), "me/feed", data);
Session["File"] = null;
Session["Message"] = null;
}
#endregion
}
}
Session["ImagePath"] = lnkimagepath.CommandArgument.ToString();
Session["FilePath"] = lnlpath.CommandArgument.ToString();
FaceBookConnect.Authorize("publish_actions", Request.Url.AbsoluteUri.Split('?')[0]);