I am new in android...i have given a task to do..i have provided an textView where my link is present..i have two buttons..on with named share in facebook and other with named share in twitter..what i have to do is when i click on any of the button at first the login page of each of the facebook or twitter is opened depending upon the button click..now when the user loged in..the link present in the textview is automatically shared on the facebook..so can anyone suggest me how to do this..if possible with example..
regards
Rahul
Facebook Dev Docs
Twitter Dev Docs
Do a little search, and you will get quite a few examples.
This can be done by getting Facebook and Twitter libraries to your project. Then make object of Twiiter and Facebook classes and perform the tasks with the help of that objects.
Related
I am trying to get permission to access user's public profile so I can provide a link to this person's profile to other people using an app.
within the api response, we have a "link", but it is a https://facebook.com/... link, and not some intent link like fb://profile/<id>
So how can I create this link without global user id and username?
I also tried to use fb://facewebmodal/f?href=<link> but it redirects me to my own facebook home page (feed)
Thank you!
Dhiogo's anwser is not working anymore. Facebook's API retrieves an user_id when the user authenticates within your application. So all you have to do is use this user_id like this:
fb://facewebmodal/f?href=https://www.facebook.com/profile.php&user_id=[user_id]
This is a closed bug that Facebook didn't fixed: https://developers.facebook.com/bugs/332195860270199
But I could find a solution!!! All you have to do is to get the scoped link that facebook graph api generates (link permission) and replace the https://facebook.com/app_scoped_user_id/ with fb://profile/?app_scoped_user_id/ leaving the rest of the link as it is.
I hope this can help you.
I search google for this problem but I didn't understand answer I found.
Actually I want to Like page grammatically like I can post a message on Page behalf of user.
I have Long term access token getting it from my app.
I have an android app where user can login through facebook account and that time I asked user for the Post permission of facebook.
So how can I do it?
I implemented simple library which allows you to add Facebook 'Like' button easy:
dependencies {
compile 'com.shamanland:facebook-like-button:0.1.8'
}
Read more details here.
The simplest way to add like button:
<com.shamanland.facebook.likebutton.FacebookLikeButton
style="#style/Widget.FacebookLikeButton"
app:pageUrl="http://url.to.like/page.html"
app:pageTitle="Title of page"
app:pageText="Short description of page"
app:pagePictureUrl="http://url.to.like/picture.jpg"
/>
This view will be drawn in your layout:
After clicking on it you will see the dialog with official Facebook 'Like' plugin.
Hi in the Facebook SDK for the Android it is only possible to Share something not to Like. if you want to Like page you should use WebView and use Iframe in it to display like button.
I used this link http://abhinavasblog.blogspot.com/2010/09/using-twitter-with-oauth-on-andorid.html to use Twitter in my application Android.
But nothing appears in interface. Should I create the interface of authentification twitter or it generated directement by code. Can any one explain me why I didn't have any displayed
Try this link also :
https://gist.github.com/97ed32efcada70516cc9
You will need:
signpost-commonshttp4.....java
signpost-core.....java
Search for these jar files on net...........
Hope it helps
I am trying for a facebook integration on my android application.
My requirement is to read each news feed as and when it comes, and to display it using a toast.
All the sample application I see on net are based on the web GUI.
Can anyone help me with a sample code or hint to read the updates into a variable/string in my application?
Regards,
Dhanesh
using this after login in facebook dialog..
Facebook fb = new Facebook(APP_ID);
String newsfeed=fb.request("me/home");
System.out.println(newsfeed);
for get user news feed....
I'm guessing it's easiest done using Facebook Android SDK (you need permission for your application to access someone's news feed);
http://developers.facebook.com/docs/guides/mobile/#android
And Graph API documentation is a good read too;
http://developers.facebook.com/docs/reference/api/
Maybe there's some better examples but I found those documents rather complete while I was dealing with Facebook accessing.
Check out the Facebook API at http://developers.facebook.com/
Have you looked at facebook's owns api. Mobile Apps. If they don't have a solution on getting new news, then theres probably no clean api to get news an you have to turn to a scrape api or write your own scrape functions.
I am new to twitter .I like to develope one twitter Application. Can anyone tell me:
The methods to be used for replying the tweets.
How to retweet with userID in arraylist
you can use OAuth for your twitter application. You can refer to these links to learn how to make calls using the same
Android: Twitter and OAuth anyone?
http://www.devx.com/webdev/Article/40511/0/page/1
http://blog.sogeti.com/mobile/2010/03/twitter-oauth-for-android.html
http://dev.bostone.us/2009/07/16/android-oauth-twitter-updates/#awp::2009/07/16/android-oauth-twitter-updates/