Quantcast
Channel: Tweetinvi a friendly Twitter C# library
Viewing all articles
Browse latest Browse all 4126

New Post: User.GetUserFromId

$
0
0
Pheonix2105 wrote:
  1. Is the code to return the providerUserID functioning correctly? (Does it return a valid ID everytime?)
  2. You could also try Convert.ToInt64() instead of long.Parse() - I believe they both return the same though so It may not matter.
  3. The only reason I can think of what with what I've seen of your code is when you refresh the page the variable providerUserID is being unset on refresh.
Yes, I checked the variable and it's ok. Converting is right. The variable(userID) always have a value.
var userID = Convert.ToInt64(providerUserID);
                
var user = User.GetUserFromId(userID);

if (user != null)
      {
           return user.ProfileImageUrl;
      }

Viewing all articles
Browse latest Browse all 4126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>