open Vine profile with username from iOS app - ios

I found that vine://user/907031926412546048 is working.
is there any way to open by username? vine://user/canaksoy
or any api call to find username by userid?

I would shy away from hard coding this. Usernames can change instantly and by hard coding it in, you literally would have to push an app update just to correlate to that new username. I think by using a user ID number its guaranteed and leaves no room for error. But if you really don't want to do that here is an alternative:
This is untested on my behalf, but I do know they have custom urls, you might be able to play with this:
https://support.twitter.com/articles/20170806-vine-profile-urls
A profile URL is a unique Vine profile address accessible from the web. Once you select an available URL you will be able to access your profile by visiting vine.co/[yourURL]. Selecting a custom URL allows you to share your profile easily and makes it easier for others to find and watch the videos you’ve created.
EDIT based on the discussion below :
This is why it's important to use unique ID :
A quick search for everyone with the username of Drew Carey:
This is why they don't have usernames in my opinion. Because they aren't unique. Even vine utilizes the unique ID when you invite someone to see your vine or profile via text or email. Additionally, when you sign up through twitter it shows your real name. There is too much room for error. I would simply ask the users to enter their custom url if they have one or unique ID until this feature is available publicly.

Related

Can I get a user's display name from Apple MusicKit?

I've been going through Apple's (awful) documentation for both MusicKit, the API and MusicKit JS, but I haven't been able to find an endpoint or method to retrieve a user's display name, email or any other information that I can use to identify the user.
Is there even a way to retrieve this?
I've been having the same issues as well. As far as I can tell, there is no way to identify the user. I'm getting around this by just giving users temporary sessions that get destroyed when they clear their cookies or unauthorize from musickit.
On the other hand, you could ask the user to log in with some other auth provider like google, github etc, and then authorize their apple music after that. Its's not the best user experience to log in to two things in a row, but I guess we have to make do

youtube feeding url is not working with my account

Hi,
I am using this URL to get feed from my youtube account
http://www.youtube.com/embed/?listType=user_uploads&list=
you have to put your user name at the end. However, my account is rather new and I dont know what my user name is. So I went to my settings and under user ID there is a long unintelligible word which I didnt chose. I tried that and didnt work.
I then tried with an older account I have and it actually shows an user name on my profile page which I remember I chose when I created the account. I tried the feed with that one and it does work so does it mean newer accounts dont have a user name?? How can I use the feed URL then?
Thank you.
If you want get the feed from a youtube channel, you can use this link:
https://www.youtube.com/feeds/videos.xml?channel_id=<channel_id>
or
https://www.youtube.com/feeds/videos.xml?user=<user_name>
Where you have to change for a valid channel_id or accordingly.
Examples:
https://www.youtube.com/feeds/videos.xml?user=Microsoft
https://www.youtube.com/feeds/videos.xml?channel_id=UCE_M8A5yxnLfW0KghEeajjw (Apple Inc.)

Rails omniauth Google - how to update profile data

I'm using omniauth to authenticate a user via Google. When the user logs in via Google, I check if an account already exists with the same email (if it does, I reject sign in).
When I create the new User model, I give it the name, email, and the URL of the user's 'image'. I am not sure how to dynamically update the information in my database when the user changes their settings on Google, including the image_url when they change their profile image.
A good example of this scenario is this Stack Overflow; I signed up to SO with Google. Having changed my profile image (recently), I was surprised to find that my old Google image remains attached to my SO profile. Maybe it takes time for Google to change the old URL to represent the new image. I have noticed that some parts of Google use my new image, and other parts continue to use my old. Of course, this question doesn't have much to do with Google's profile image mechanism, I just think this is a perfect example.
My questions are:
Should I want to do this, or should I instead provide the user the ability to change their details through my site, completely ignoring what happens to their Google profile?
If I should do this, what is the best way? Checking on every login isn't ideal as the user might not log out for days or even weeks.
Should I be storing the Google auth token? Currently, I'm not as I don't need to make any Google API calls -- I only use OAuth for the 'uid' to ensure it's the same account logging in (the email isn't used at all).
I don't think the answer will be "don't store user info, query Google instead", so I'm not really sure what best practice is in this scenario. A brief walkthrough on proper procedure would be very helpful.
Normally, oauth applications will use the endpoint /me.json as part of the login process: After the user is signed in, the app uses that fresh token to query their profile info right away and update data. In your case, I understand you ignore when email already exists. You should probably add a new step there, to update your local record if it already exists instead of purely ignoring it.
In other words, your app wont be automatically notified if users change their profile pictures. But you can always use their log in action to fetch the latest image (or use their token in a background job that runs every n periods of time using something like cron + whenever, assuming the oauth scope authorizes offline access)

Facebook Connect - simply add a user's Facebook profile url into database via Rails

I'm coding a simple app which should use some FB connect mechanics but I don't want too much overhead here so maybe you can share your thoughts/experience on my task:
merchants can post products they want to give away for free
users can register for the article and get into a raffle
Once a user enters the page, I want the page to connect to his FB profile URL (facebook.com/username). User hits a "Add me to the raffle" button, the FB profile URL gets stored into my model. The merchant or a cron choses the FB profile URL randomly, displays it and lets the merchant connect to the winner (this I realised already).
This is what I've done so far:
http://limitless-brook-6233.herokuapp.com/ads/1
as you can see, I realised it via email addresses which get shuffled by the merchant. This is not very clever since FB profiles are somehow more unique and everyone can participate only one time.
What is the smartest way in your opinion to retrieve a user's Facebook URL and store it into my database? I just need to attach it to some text/input field (non editable) and let the user hit that button.
Thanks for any support.
You need to use Facebook login, take a look here
https://developers.facebook.com/docs/facebook-login/
or here
https://github.com/mkdynamic/omniauth-facebook
for the second one use version 1.4.0 as 1.4.1 has ome annoying bugs.

Implementing normal user/pass, Twitter & Facebook auth

I have created a public facing website which allows you to login using a username/password, or with Twitter, or with Facebook.
When logging in with Twitter for the first time (for example), a user is created in my database with a nickname matching the Twitter screen name. I want this nickname to always be unique.
The problem is that in some cases a user with that nickname already exists, so the user can't be added. I am unsure as to the accepted approach for this problem, the only solution I can see so far is to ask the user to override their nickname, but this doesn't seem too elegant.
The reason the nickname needs to be unique is not a code issue, but an interface issue, for example there are forums and I want each user to be uniquely identified by their nickname.
Are there any other methods anyone can suggest for dealing with this problem?
Edit: At the request of some of the replies I will clarify an example:
Lets say I have a user named Joe Bloggs who is a member on my website. He is not a member of Twitter or Facebook. His nickname on my site is JoeBloggs.
Then, another Joe Bloggs comes along, and wants to sign in with his Twitter account. His Twitter name is JoeBloggs, so when he signs in with Twitter, my system attempts to automatically set his nickname to JoeBloggs. However, this nickname already exists. What is the normal or best practice in the cases where nicknames like this overlap? The only thing I can think of is to prompt the user to specify a different and unique nickname (just for display on my site).
The reason I ask is that this must be a common issue for sites which let you login via Facebook, Twitter, Yahoo - there must be an overlap in the names which are returned from said websites, so I wondered what the normal process is.
Could you use the Twitter API to confirm they really are the Twitter ID they say they are, and if no Twitter account, allow them other means to authenticate (Google+, Facebook, LinkedIn, old school username and password)? Allowing users to login with a Twitter ID that they don't own seems like asking for a world of hurt.
Maybe you could try and change the database itself - get a field like 'nickOrigin', allow there values like '[yourSite]', 'twitter', etc., and only allow new entries if no entry with the same nick AND nickOrigin exists. Execute a query to modify existing users to have a nickOrigin of [yourSite], and things should be backwards compatable, or at least I imagine them that way :)

Resources