ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Can FaceBook Access Token be reused<p>As far as I know it is not re-usable. It expires after certain period</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/Thu, 27 Dec 2012 04:38:37 GMTCan FaceBook Access Token be reused<p>can we use it second time at same time</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/Thu, 27 Dec 2012 22:30:54 GMTCan FaceBook Access Token be reused<p>Yes you can use it, untill you get error from FaceBook when it expires</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/Thu, 27 Dec 2012 22:52:39 GMTCan FaceBook Access Token be reused<p>but i got error when we want to use it again</p> <p>if you want to view my code then i send it</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/Thu, 27 Dec 2012 22:57:45 GMTCan FaceBook Access Token be reused<p>If you get error that means you cannot use it. Could you please let me know what article you are referring and what is actually you want to do?</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/Thu, 27 Dec 2012 22:59:03 GMTCan FaceBook Access Token be reused<p>if (Request.QueryString["code"] != null)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (Request.QueryString["error"] == "access_denied")<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('User has denied access.')", true);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string code = Request.QueryString["code"];<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!string.IsNullOrEmpty(code))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string data = FaceBookConnect.Fetch(code, "me");<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FaceBookUser faceBookUser = new JavaScriptSerializer().Deserialize&lt;FaceBookUser&gt;(data);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; faceBookUser.PictureUrl = string.Format("https://graph.facebook.com/{0}/picture", faceBookUser.Id);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //pnlFaceBookUser.Visible = true;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //lblId.Text = faceBookUser.Id;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Labelwelcome.Text = faceBookUser.Name;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //lblName.Text = faceBookUser.Name;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //lblEmail.Text = faceBookUser.Email;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ProfileImage.ImageUrl = faceBookUser.PictureUrl;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Labelwelcome.Visible = true;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; linksignout.Visible = true;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Linksignin.Visible = false;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ProfileImage.Visible = true;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lblw.Visible = true;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Response.Cookies["name"].Value = id;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p> <p>&nbsp;</p> <p>and after this info show in wel come penal in my web site</p> <p>and also want to show list of friends</p> <p>string code = Request.QueryString["code"];<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!string.IsNullOrEmpty(code))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int i = 0;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string data = FaceBookConnect.Fetch(code, "/me/friends");<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FaceBookData1 facebookData = new JavaScriptSerializer().Deserialize&lt;FaceBookData1&gt;(data);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach (FaceBookUser1 user in facebookData.Data)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; user.PictureUrl = string.Format("https://graph.facebook.com/{0}/picture", user.Id);<br /><br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gvFriends.DataSource = facebookData.Data.GetRange(0, 15);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gvFriends.DataBind();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p>https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/Fri, 28 Dec 2012 00:08:52 GMTCan FaceBook Access Token be reused<h2><em>this is the error<br /></em></h2> <h2><em><br /></em></h2> <h2><em>The remote server returned an error: (400) Bad Request.</em></h2> <p><span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"><span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"> <strong> Description: </strong>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. <br /><br /> <strong> Exception Details: </strong>System.Net.WebException: The remote server returned an error: (400) Bad Request.<br /><br /> <strong>Source Error:</strong> <br /><br /></span></span></p> <table width="100%" bgcolor="#ffffcc"> <tbody> <tr> <td> <pre>Line 28: //Labelwelcome.Text = faceBookUser.Name; Line 29: <span style="color: red;">Line 30: string data = FaceBookConnect.Fetch(code, "me/friends"); </span>Line 31: //Response.Cookies["name"].Value = id; Line 32: FaceBookData facebookData = new JavaScriptSerializer().Deserialize&lt;FaceBookData&gt;(data);</pre> </td> </tr> </tbody> </table>https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/Fri, 28 Dec 2012 02:38:59 GMTCan FaceBook Access Token be reused<p>Can you tell me which article you are referring?</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/Fri, 28 Dec 2012 03:02:14 GMTCan FaceBook Access Token be reused<p>as your article</p> <p>http://www.aspsnippets.com/Articles/Fetch-and-import-FaceBook-Friends-and-Contacts-with-profile-pictures-in-ASPNet.aspx</p> <p>its ok </p>https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/Fri, 28 Dec 2012 03:18:01 GMTCan FaceBook Access Token be reused<p>Download the same from the link</p> <p>http://aspsnippets.com/Articles/Import-Facebook-Album-Photos-and-display-as-Image-Gallery-in-ASPNet.aspx</p> <p>And use the DLL provided in its BIN folder. Its version 2.0 and will solve your issue</p>https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/Fri, 28 Dec 2012 03:46:40 GMTCan FaceBook Access Token be reused<p>problem is solved with new dll&nbsp;version 2.0 but now issue is that when we refresh the page then there are same problem again</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/Fri, 28 Dec 2012 23:52:15 GMTCan FaceBook Access Token be reused<p>Then you need to use Try catch at your end and if page is refreshed and if you get error you need to again generate new code and token</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/Sat, 29 Dec 2012 00:10:03 GMTCan FaceBook Access Token be reused<p>thaxs lot 4 help ............thanku u very much</p> <p>sir plz help me to fetch friends's actvity which only relative with category city like or place name etc....</p> <p>means i want fetch those friends`s activity which is liked some thing like(city,hotel,visited place) etc</p>https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/Sat, 29 Dec 2012 00:32:51 GMTCan FaceBook Access Token be reused<p>Mark the reply that helped of mine as Answer and ask a new question</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/Sat, 29 Dec 2012 00:54:44 GMTCan FaceBook Access Token be reused<p>my problem is not match with my question........</p> <p>i asked about expire validation of token but problem in my dll file</p> <p>so that how to make answer for it ..............</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/Sat, 29 Dec 2012 00:59:16 GMTCan FaceBook Access Token be reused<p>Your problem is solved. I asked you to check if you get error that means your token is expired and you need to again get a new token</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/https://www.aspforums.net:443/Threads/389324/Can-FaceBook-Access-Token-be-reused/Sat, 29 Dec 2012 02:38:08 GMT