I’ve been storing the profile url for users that authenticate with Foursquare like this: foursquare_url = “http://foursquare.com/#{access_token.info.nickname}”
It seems that Foursquare stopped providing nickname in the access_token, so now I save the url like this: foursquare_url = access_token.extra.raw_info.canonicalUrl
The issue is that some users authenticated before I made the change, so they all have ‘http://foursquare.com/’ as a profile url. How can I loop over those users and store the correct url?
Thanks!
In order to make a request on a user’s behalf, you need to use their access_token. If you don’t have those stored in your database, you’ll have to capture it the next time they authenticate your site and fetch the needed information via the foursquare API.