Welcome Developers!

in

Welcome!

in

opensocial_viewer_id == -1 ??? what does this mean?

Last post 11-16-2009 4:51 PM by Chad Russell. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 04-20-2008 3:04 PM

    • Cyn
    • Top 200 Contributor
    • Joined on 03-01-2008
    • Posts 26

    opensocial_viewer_id == -1 ??? what does this mean?

    I'm getting a small stream of views to the canvas where the GET variables are properly populated from makerequest, but every once in a while I get one where the opensocial_viewer_id is -1.

     

     What is this?  I can't replicate this, so I don't know how to handle it.

     

    Just guessing:  I know there's a condition where, after some time, you'll get auto-logged out, but it still looks like you're logged in.  Most profile stuff doesn't care, but apps do.  Is that what's going on?

     

  • 04-20-2008 10:00 PM In reply to

    Re: opensocial_viewer_id == -1 ??? what does this mean?

    Basically, yes. It's difficult to test for, particularly in Development, but I think it's a result of the viewer not being logged in. Because MySpace profiles can be viewed completely anonymously (that is, a user does not have to be signed in, or even have a MySpace account, to view a public profile), there's no way for the platform to retrieve an Id.

     

  • 05-06-2008 10:20 AM In reply to

    Re: opensocial_viewer_id == -1 ??? what does this mean?

     Jeremy,

     

    How are you testing for logged out users?  Doing $_REQUEST['opensocial_view_id'] == -1 isn't consistent for me to redirect people out. 

  • 05-06-2008 11:54 AM In reply to

    Re: opensocial_viewer_id == -1 ??? what does this mean?

    How do I do it? I don't -- I only ran the test once, through a massive amount of trickery with a custom browser.

    But, to an App, there is no difference between a logged-out user and a user who hasn't installed the App, so I'd use the same basic mechanism for both -- if I can't retrieve your data, I provide a link to the App Profile, and ask the user to either install the App or log in.

    Just out of wild curiousity, though, why isn't '-1' consistent? What else are you getting for opensocial_viewer_id from a logged out viewer?

  • 05-09-2008 8:51 AM In reply to

    Re: opensocial_viewer_id == -1 ??? what does this mean?

    Jeremy, It is consistent only on my development app, but on Live it never gives -1 for opensocial_viewer_id even though I am logged out. For me, it isn't working the same as a user who doesn't have the application installed. It simply loads a blank page. There must be something going on in live that isn't in dev or vice versa.
  • 10-27-2009 9:30 AM In reply to

    • ethan
    • Not Ranked
    • Joined on 10-27-2009
    • Posts 3

    Re: opensocial_viewer_id == -1 ??? what does this mean?

    Hi, Does this mean that there is not a javascript API method for determining whether a viewer is logged in or not? Can I use makeRequest to hit my 3rd party API and if opensocial_viewer_id is equal to "-1" assume that the viewer is not a member of MySpace (i.e. not logged in) thanks
    Filed under: , ,
  • 11-16-2009 4:51 PM In reply to

    Re: opensocial_viewer_id == -1 ??? what does this mean?

     Hi, a user ID of -1 should mean the user isn't logged in.  Try this to determine whether they're logged in or not:

    gadgets.views.getParams().loggedOut

    Chad

Page 1 of 1 (7 items)