I am building an android application and I am stuck at one place. I have integrated Twitter in my app using twitter4j, signpost apis. I am successful in writing code for putting text in user profile but I also want the user to follow my app when they click 'follow us on twitter' button.
Can anybody give me reference or guidance of writing such code?
What you are probably looking for is createFriendship()
You can see how it is used here
2016 Edit: Google code svn is broken and twitter 4j has moved
http://twitter4j.org/en/api-support.html
Related
Currently, I am making an Android app in which I need to integrate the complete Twitter app.
I went through Fabric website where I got to know that using the plugin in my app I could integrate Twitter App functionalities very easily.
I want to know if someone has used it.
Will it be really helpful in my case?
Does it give the same feel of the original Twitter app?
Does the plugin also provide UI(Twitter app UI) or do I have to make my own UI?
The twitter APIs and SDK is one of the most advanced and interesting ones i have ever used. It gives the real feel and look of twitter ( login, twitter lists). The SDK does most of the work for you. For example when you want to list tweets using List,the only thing you will need is to create a list view and a text view in your xml.
Initializing the sdk in your app is just less than 5 lines of code.
The console is easy to use as well. This will help you set up your app so fast.
For me i didnt feel like a programmer when using the SDK unlike when I am really struggling to use GMAIL APIs.
Go ahead and just do it.
Happy Coding.
Salam every body
I want to develop a project that allow to user to view latest picture uploaded in a certain pages
i'm new in facebook android sdk and i don't know what is the first step to do
can you give some directives to start this project?
best wishes.
I always recommend that developers who are looking to integrate Facebook into their apps to start with our documentation. This tutorial on our developers page walks you through a sample app that gets you started with our most basic SDK functionalities such as logging in via Facebook, uploading a picture, and grabbing the user's profile picture for example. Once you go through that, you should be well-versed enough to learn how to extend the SDK functionalities to do what you want.
This community is also very helpful when you have questions (but you have to provide context, sample code, and very thorough description of the problem you're facing).
I have a problem with my app and I don't know if the problem is obvious.
I have managed to post things to my facebook wall using the app I have created for Android.
But when I distribute this app to my testers, they don't get to the login window. The app is terminated before the screen appears.
I have used the tutorial:
http://developers.facebook.com/docs/mobile/android/build/
Can somebody help me. Are some things I can check or is there a more thorough explanation available on the internet?
you need to follow following steps,
1.) go to https://github.com/facebook/facebook-android-sdk/tree/master/examples
2.) download the example named Hackbook.
and execute it , this is working example of facebook integration with android
Here condition is that you must have App ID and App secret.
if is there any problem let me know.
While using the Facebook SDK for Android, I realise Facebook uses their own dialogs with forms so the user can enter their information.
Is there a way to use my own forms and send the data to Facebook to authenticate? Or do I have to use theirs? If so, is that the same case for uploading pictures, posting on your wall, comment, etc.
I'm not sure about uploading pictures, but I ran into the same problem some time before with the forms and after a lot of research reached the conclusion that you have to use their forms. The only application AFAIK that uses custom Facebook login on Android is Facebook for Android (official application).
You might be able to figure out a way by tracing the URL that is being used by Facebook for authentication, but those sorts of hacks won't be reliable as Facebook may change the API on you. It sucks, yeah.
Here is some more information, Stack Overflow question Android -> Facebook login without a dialog?.
I'm learning Android and I'm trying to connect to Twitter and upload a photo in Android. How can I do this?
This question gives you a hint on how to use an Intent to start a Twitter application and use it to to post something. In this way the user don't have to give your program the twitter credentials.
If you want to connect to twitter yourself you can use one of the java twitter apis that are out there.
I hope this is a starting point. If you encounter more specific problems come back and we will be glad to answer them.
For a general howto on Android check out the hello world application and all the other tutorials on the android developer pages.