Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to get user image from Foursquare IOS sdk

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 278
    Comment on it

    Foursquare authenticate API returns all the information related to user's fourSquare account. In this response under "user" tag there is a tag "photo" with two other tags "prefix" and "suffix" like below.

    photo =     {
            prefix = "https://irs1.4sqi.net/img/user/";
            suffix = "/QHNJDIAFOXSJXR1H.jpg";
        };
    

    To get the user image you need to concatenate these two values like below.

    NSString *imageURL = [NSString stringWithFormat:@"%@original%@",
                          [result valueForKeyPath:@"response.user.photo.prefix"],
                          [result valueForKeyPath:@"response.user.photo.suffix"]];
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: