Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #3 from scottksmith95/master

Added support for missing 'show_all_inline_media' field in Twitter user object [SPRNETSOCIALTW-3]
  • Loading branch information...
commit 8d0f0d8b33e4c4e945db3638d3f1d1afaac83ab5 2 parents 5943360 + 36909a4
@bbaia bbaia authored
View
3  src/Spring.Social.Twitter/Social/Twitter/Api/Impl/Json/TwitterProfileDeserializer.cs
@@ -38,6 +38,7 @@ public object Deserialize(JsonValue value, JsonMapper mapper)
{
// TODO: Use JsonValue.GetValueOrDefault<T>()
JsonValue isTranslatorValue = value.GetValue("is_translator");
+ JsonValue showAllInlineMediaValue = value.GetValue("show_all_inline_media");
return new TwitterProfile()
{
ID = value.GetValue<long>("id"),
@@ -72,7 +73,7 @@ public object Deserialize(JsonValue value, JsonMapper mapper)
IsBackgroundImageTiled = value.GetValue<bool>("profile_background_tile"),
TextColor = value.GetValue<string>("profile_text_color"),
LinkColor = value.GetValue<string>("profile_link_color"),
- ShowAllInlineMedia = value.GetValue<bool>("show_all_inline_media"),
+ ShowAllInlineMedia = showAllInlineMediaValue != null ? showAllInlineMediaValue.GetValue<bool>() : false,
};
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.