I have a very simple form, consisting of a textarea and a submit button.
Is it possible to send the text as a tweet when someone pushes the button, if the user is already logged into twitter on another tab ?
I want to try a very simple mockup for something, I just need to send a tweet, do I still need to mess with oAuth ?
No, it's not possible. It would be quite a security issue if any website could just send tweets with your account without authorization.
You've to register an application with Twitter API, Then make Authentication for the user.
After that you can post tweets or whatever your permissions allow.
Posting tweets without Authentication is very dangerous and can be considered as malware.
You can use some ready-to-use libraries to help you with the oAuth, instead of re-inventing the wheel.
Related
For a project I am working on, I think having the functionality to sign in with facebook/ twitter would be beneficial.
I have some design theory to iron out.
When the user first logs into the website using either twitter or facebook, I'll get their email and other relevant information and store it in the database where a normal signed up user would be stored.
When they return, they would log in with twitter/ fb again and it would locate the information in the database and not add it again.
If anyone tried to sign up with the email address provided by either of these services, an email would be sent to the email address to confirm it is them and then they could generate just a password to allow them to log in with information already stored.
I could they link other data on the website to the userid I have stored for them throughout the entire process.
So my query would be whether this is the correct way to go about this?
How have others used these types of login api's and then binded them to on site data?
I believe this to be a reasonable question but if I have placed it in the wrong section, please feel free to move it!
Thanks.
well, everything should be written here http://developers.facebook.com/ also try using php sdk for facebook api, for twitter here https://dev.twitter.com/
Create an app in both fb and twitter, take the access token and access token secret
You should download all the files necessary and then configure them as is written in manual, if you will have trouble connecting to them write me a message to my mail(jurijs.nesterovs#inbox.lv) i'll try to help
Have done that before myself for my site. It was Fb/Twitter/Google. I bet thats the best thing to do. Google's API is the easiest out of these 3. Twitter was hard for me since I dont use OOP and all the libraries out there was OOP.
And about your design, my site was made not to not allow the user to join with the same email again. If they have joined using Facebook with an email, when they try to join using twitter with the same email, I would tell the user that they are already registered using Facebook.
I read the Facebook dev info on how to make a request (located here) but I don't exactly understand what it does. Here's what I'd like to do. I'm using PHP and javascript.
I want a logged in user to send a request to a specific URL (with parameters attached) to multiple Facebook users (users who are already signed up for my site). Also, I need to be able to get the users that they selected and save them in the database, because only those users will have access to the URL that they're being invited to.
Are there any suggestions on how I can accomplish this?
I'm thinking you are talking about the a url request. From my experience this can be done using a simple JQuery request. You can find an example here and you can also read up on java APIs and how to use the methods(Google it). Hope this helps.
The requests dialog is for invitations to Facebook Canvas applications.
You are most likely thinking about the send dialog: https://developers.facebook.com/docs/reference/dialogs/send/
Add a callback function to FB.ui call that saves the id, this will only work if the user ids are hardcoded in. If the user manually adds them, I doubt you can track it.
I'm developing a simple Facebook application, and now I need to create a page where the user can invite friends.
Two questions about it:
How can I send invite using the PHP-SDK ?
Can I send custom invite? with "custom" i mean that I must to know how many users have been invited by user. How can I do it?
Have you attempted anything or do you have any code to show us? It sounds like you're just asking for the code especially as it is custom. You could try getting a list of users friends, and have a checkbox by each one, then you can access the array of who they selected. Then look at publish_actions permission - though I don't think it would be the best performance wide to loop through each friend and make a graph post to them on behalf of the user. I know you want a custom solution but to be honest your best bet maybe to use the native friend selector and the js-sdk
https://developers.facebook.com/docs/reference/dialogs/requests/
Then use the callback and some ajax to save the information you require. Look at the requests example here as well
https://developers.facebook.com/tools/console/
Not sure if this has been done before, but did some searching and could not find anything.
I would like to have an input box on my webpage, which has some pre-populated text and when a user clicks submit the text is tweeted on their own wall, this would be posted immediately if they have a twitter session open if not twitter will ask for the user to sign in. I guess this must be possible because it is similar to a share button.
Not being very good with twitter I'm not sure where to even start.
(Also if possible I would like to do the same but with Facebook as well).
Nb. App is to be developed using php.
Thanks
Both twitter and facebook have well-documented API to do this. However, you will probably need to use their system to have the user confirm what is about to be posted. You might also need to use some javascript, I don't the specifics of these API.
https://dev.twitter.com/
https://developers.facebook.com/
You cannot do this on facebook. We do not allow pre-filling of the message param on dialogs.
Is there a quick & easy way to setup an application to allow a user to use it if they tweet about you? Maybe click a button, it auto tweets and they can move forward in the application. Is there an application that makes this KISS simple, or do I have to start logging through the twitter API?
Use Case:
User Logs onto website & inputs email.
Popup: Tweet about us to use the application for free.
User tweets & continues through application.
You can't tweet into someone's account without them first logging into your application through OAuth. You also can't tweet into someone's account when they do log in without their prior permission. That would be a violation of the Twitter TOS.
But you can help someone tweet about you without them logging in first. If you create a hyperlink with the URL form:
http://twitter.com/?status=[the text you want them to tweet]
When they click this link, the text you want them to tweet will be in the status box on their Twitter page. If they then click the tweet button, the tweet will be sent. You can use the search API to watch for these tweets, and do whatever you want to reward that user.
This is not spam, since the user chooses to send it. Not you. But it may be offensive, and it may get Twitter upset, if it happens too much.