social_profile 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -78,7 +78,9 @@ module SocialProfile
|
|
78
78
|
def find_upload_url
|
79
79
|
server = @target.photos.getUploadServer(:aid => identifier)
|
80
80
|
|
81
|
-
if server && server['
|
81
|
+
if server && server['upload_url']
|
82
|
+
server['upload_url']
|
83
|
+
elsif server && server['response']
|
82
84
|
server['response']['upload_url']
|
83
85
|
else
|
84
86
|
nil
|
@@ -86,7 +88,8 @@ module SocialProfile
|
|
86
88
|
end
|
87
89
|
|
88
90
|
def normalize_hash(hash)
|
89
|
-
|
91
|
+
hash = hash["response"] if hash.is_a?(Hash) && hash["response"]
|
92
|
+
response = Array.wrap(hash).first
|
90
93
|
response || {}
|
91
94
|
end
|
92
95
|
end
|