Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Facebook connect

Facebook connect

Scheduled Pinned Locked Moved ASP.NET
csharphtmlasp-netcom
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    benams
    wrote on last edited by
    #1

    I use the following code in order to conncet my asp.net website to facebook string appId = "xxx"; string[] extendedPermissions = new[] { "publish_stream", "offline_access" }; var oauth = new FacebookOAuthClient { AppId = appId }; var parameters = new Dictionary<string, object> { { "response_type", "token" }, { "display", "popup" } }; if (extendedPermissions != null && extendedPermissions.Length > 0) { var scope = new StringBuilder(); scope.Append(string.Join(",", extendedPermissions)); parameters["scope"] = scope.ToString(); } var loginUrl = oauth.GetLoginUrl(parameters); Response.Redirect(loginUrl.AbsoluteUri); but when I run this I get a login page(full page altough I set the display property to "popup"), and after login I redirected to a page which is not my website page(http://www.facebook.com/connect/login\_success.html#access\_token=xxx;expires\_in=0). The page includes the word "succeed" only...

    P N 2 Replies Last reply
    0
    • B benams

      I use the following code in order to conncet my asp.net website to facebook string appId = "xxx"; string[] extendedPermissions = new[] { "publish_stream", "offline_access" }; var oauth = new FacebookOAuthClient { AppId = appId }; var parameters = new Dictionary<string, object> { { "response_type", "token" }, { "display", "popup" } }; if (extendedPermissions != null && extendedPermissions.Length > 0) { var scope = new StringBuilder(); scope.Append(string.Join(",", extendedPermissions)); parameters["scope"] = scope.ToString(); } var loginUrl = oauth.GetLoginUrl(parameters); Response.Redirect(loginUrl.AbsoluteUri); but when I run this I get a login page(full page altough I set the display property to "popup"), and after login I redirected to a page which is not my website page(http://www.facebook.com/connect/login\_success.html#access\_token=xxx;expires\_in=0). The page includes the word "succeed" only...

      P Offline
      P Offline
      Parwej Ahamad
      wrote on last edited by
      #2

      benams wrote:

      The page includes the word "succeed" only...

      Then what can we do? It's very hard to get response from CP about question related to FB. So you canask these question in FB forum then you can get more response. http://forum.developers.facebook.net/[^] Thanks

      Parwej Ahamad ahamad.parwej@gmail.com

      B N 2 Replies Last reply
      0
      • P Parwej Ahamad

        benams wrote:

        The page includes the word "succeed" only...

        Then what can we do? It's very hard to get response from CP about question related to FB. So you canask these question in FB forum then you can get more response. http://forum.developers.facebook.net/[^] Thanks

        Parwej Ahamad ahamad.parwej@gmail.com

        B Offline
        B Offline
        benams
        wrote on last edited by
        #3

        I read it supposed to take me back to the previous page so I could get information from the logged FB account.

        1 Reply Last reply
        0
        • B benams

          I use the following code in order to conncet my asp.net website to facebook string appId = "xxx"; string[] extendedPermissions = new[] { "publish_stream", "offline_access" }; var oauth = new FacebookOAuthClient { AppId = appId }; var parameters = new Dictionary<string, object> { { "response_type", "token" }, { "display", "popup" } }; if (extendedPermissions != null && extendedPermissions.Length > 0) { var scope = new StringBuilder(); scope.Append(string.Join(",", extendedPermissions)); parameters["scope"] = scope.ToString(); } var loginUrl = oauth.GetLoginUrl(parameters); Response.Redirect(loginUrl.AbsoluteUri); but when I run this I get a login page(full page altough I set the display property to "popup"), and after login I redirected to a page which is not my website page(http://www.facebook.com/connect/login\_success.html#access\_token=xxx;expires\_in=0). The page includes the word "succeed" only...

          N Offline
          N Offline
          Not Active
          wrote on last edited by
          #4

          Follow the forum guidelines and format your code, and you may receive more responses. If you can't follow the guidelines why should we read your question or help?


          I know the language. I've read a book. - _Madmatt

          1 Reply Last reply
          0
          • P Parwej Ahamad

            benams wrote:

            The page includes the word "succeed" only...

            Then what can we do? It's very hard to get response from CP about question related to FB. So you canask these question in FB forum then you can get more response. http://forum.developers.facebook.net/[^] Thanks

            Parwej Ahamad ahamad.parwej@gmail.com

            N Offline
            N Offline
            Not Active
            wrote on last edited by
            #5

            Parwej Ahamad wrote:

            It's very hard to get response from CP about question related to FB

            Even more difficult when the OP doesn't follow the forum guidelines and format any code posted.


            I know the language. I've read a book. - _Madmatt

            P 1 Reply Last reply
            0
            • N Not Active

              Parwej Ahamad wrote:

              It's very hard to get response from CP about question related to FB

              Even more difficult when the OP doesn't follow the forum guidelines and format any code posted.


              I know the language. I've read a book. - _Madmatt

              P Offline
              P Offline
              Parwej Ahamad
              wrote on last edited by
              #6

              Yes Mark, you are absolutely right.

              Parwej Ahamad ahamad.parwej@gmail.com

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups