I know you can find the profile image of a twitter user using the following url:
https://api.twitter.com/1/users/profile_image?screen_name=twitterapi&size=bigger
But how can I determine if it is the default image or the image uploaded by the user?
https://dev.twitter.com/docs/user-profile-images-and-banners
Users who have not uploaded a profile image can be identified by the default_profile_image field of their user object having a true value.
Related
Some of the user’s images are stored in Azure BLOB which is not publicly accessible. In our scenario we upload the images (user’s images) on private blob which later needs to be shown at the client side(Angular). Moreover the user should only be able to see the images that is related to him and not the images of other users.
We can generate the list of images URLs at server side but when this is passed to client side to render, it would fail naturally being blob not being public.
Now, being all the users who would access the application are internal to the organization, I believe authorization to access the images can be achieved by AAD/SAS. However at the same time, I am fail to understand how would I ensure or apply the security that if wanted user X should not be able to read the images of user Y?
Regarding the issue, you can use the following suggestions to implement it.
Store the User information and his image information (such as the image's azure blob container name, azure blob blob name ) in the database.
When the user wants to access the image, query the database with the user information to get these image,
After getting the image information, use the sdk to create sas token then return the image's blob url with sas token to cliend. Regarding how to create sas token, please refer to here.
The app should:
create new profile with email or Google Sign-In or Facebook Login
after creating the profile there is an email verification and then the user can sign in
if is the first time it should show a page to create a new in-app profile (creating a document in the database with the uid of the user with description, skills...)
but in this page if the user Google Sign-In it should show name and surname and the Google profile picture and let them add additional info such as description and their skills...
The first 2 steps are easy to achieve but how can I understand if the user just created the profile or he just logged out and in again or he simply uses Google Sign-In every time. And how can I take the user info from the database in Firebase and show it in the create in-app profile page.
Is it possible to achieve in SwiftUI?
Thanks!
To detect is a signed-in user is new, you can compare lastSignInDate and creationDate in the UserMetadata object.
Also see:
Get Created date and last login date from FIRUser with Firebase 3
iOS/Swift/Firebase Authentication: Help Needed on Accessing "isNewUser", which shows the isNewUser that you can also sometimes use (depending on your implementation).
Suppose I showed an expert an image url like this:
https://www.facebook.com/photo.php?fbid=10102210419817761&set=ecnf.4&type=3&theater
OR
https://scontent-arn2-1.xx.fbcdn.net/v/t1.0-9/10267763_10102210414947521_2931549383973829138_n.jpg?oh=d71a1c21c4b5f8b8ca42ce7647fff10d&oe=59F7421E
What information does that contain? Especially, could the url be used to detect the facebook profile that was logged in when the image was loaded? Can I compromise my own privacy online by linking others to random facebook images just by being logged into my profile while doing so?
Thanks!
I used the below url, I received the pictures which I posted with the specified tag name. But I can't get images posted with tag name by another person.
Please Help Me.
https://api.instagram.com/v1/tags/{tag-name}/media/recent?access_token=MYACCESS-TOKEN.
You are in Sandbox mode, so it will return only media from your sandbox authorized user, here is information about this:
As another example, let's consider an endpoint that returns a list of
media: /tags/{tag-name}/media/recent. The response returned by this
endpoint will contain only media with the given tag, as expected. But
instead of returning media from any public Instagram user, it will
return only media that belongs to your sandbox users, restricted to
the last 20 for each user.
Here is the link to more details about Sandbox mode: https://www.instagram.com/developer/sandbox/
A trick that works fine to get user's profile picture-url is to add the secure=true param.
http://api.linkedin.com/v1/people/~:(picture-url;secure=true,public-profile-url,id)
This is not working for most of the images. Some examples are:
Company 'logo-url' and 'square-logo-url'
Company status update 'submitted-image-url'
Group 'small-logo-url' and 'large-logo-url'
Group post attachment 'image-url'
Is there any workaround to get a secure image in those cases?
LinkedIn API returning secure images for profile only(secure=true) now
for company,group etc not have any mechanism for getting secure image