Facebook news feed from public pages - android

I have a designing problem and I don't fully understand facebook instructions.
I'm implementing an android app and I would like to get news from 2 facebook pages (public news).
I know that there is an access token, but I'm not sure how to get it for these 2 pages.
I imagined such solution:
Create my facebook app (Still my app access token is useless in this situation).
Ask clients (these 2 facebook pages) to use my app.
Then I could get their news. (?)
Unfortunately creating facebook app and giving necessary permissions is very time-consuming so I want to make sure that this solution is correct.
Or maybe is there a much better/faster solution?
Thank you for help!

Related

Android) Get WeChat login information

I succeeded, Creating a Facebook App to get the login data. so, I want to create an app to get the login data of the next wechat.
But it was less information, and a lot different.
So I want to ask you a few questions.
It will provide the login button like Facebook?
It is available in Android Studio to easily add code to Gradle?
Is there a site where you can view basic information on how to receive a login WeChat to Android Studio?
I apologize for the difficult questions.
Please answer a lot or a little.
Thanks.

Link to login to social Media from app

In my app I want to have a link or button that can use stored credentials to login to social media sites - say facebook. But, since I plan on having a multiple links/buttons to different sites that may use different login info, I cannot force users to login to my app using any of the social media credentials.
Please forget the storing of credentials for now - that is a different issue altogether.
My question is Can I send the user's info to Facebook to allow them to login without having to take them to the login screen? If so, where to best find the information to do that?
Sorry if this is a noob question, but I am a noob to app dev and still trying to get my direction. Any sites or links with information would be appreciated.
sorry for the answer but from my experience you need to go through Facebook API to log in an android application using facebook,same for other social network. No clue what you wanted to do use a HTTP POST with the credential ?
There is a serious security issue with what you're trying to do, because it's you're application that handles the social network credential and so you would need to encrypt them store them and so on...
So if you want to give a try to Facebook Android API it's here : https://developers.facebook.com/docs/android/getting-started/
Dealing with the Facebook API is too much easy. You will follow some steps to import it into your project. Register your App on facebook developer site. Put the facebook button into your layout.
When the user clicks on the button the API will handle all the subsequent steps starting from taking the user username and password and will reply to you with a temporary accessToken that will be valid for two months. This is the only communication way with Facebook API, if you want to give the Facebook API any info with any other way. I am sorry to tell you you will not be able to do that.

Facebook graph excluding application posts

Developing an Android App integrated with Facebook.
After registering my app on Facebook, getting authorization etc - I`m able to post text and images to a users timeline. When I open the timeline in a browser - I see the posts displayed correctly. However, when I query the graph with
https://graph.facebook.com/{user id}/feed
the result includes everything of that users timeline, EXCEPT for the posts made by my application.
Any ideas why is this and how can I get the complete feed/the posts made by the application for this user only?
The reason for not seeing the posts made by my App is that they when published, they will belong to the "USER/statuses" node, not "USER/feed" which I had expected. To me, this is rather confusing given that the only object publishing allowed by the Graph API is exactly "USER/feed" and that is the node which I call with my POST request.
Anyhow, upon querying with
https://graph.facebook.com/{user id}/statuses
the application posts are returned accordingly. I make the assumption that a user`s facebook wall combines statuses and posts.
I can not find a reference to any documentation from Facebook on this, if somebody knows of such - please share it.

More advanced android facebook example

I'm having some problems with facebook integration on my android app. I've looked at the examples that come with the api and i can do the things shown in those ok. But i'm having problems with other things such as getting single sign on to work properly, authentication across multiple activities in the app and loading a facebook page (non-api call) without being asked to log in again.
Anyone have examples that show these?
When making API calls, you usually need to include the access_token parameter that was issued when the user authenticated. This is how facebook knows who you are when you make requests.
Similarly, when loading facebook pages (not using the API), you have to remember to send the cookies Facebook sent when the user logged in. Normally the browser keeps track of these automatically, but in your program or app you might have to handle them manually.
I don't have experience with Android specifically, and I don't know what you're using to load and render facebook pages, but knowing how facebook is keeping track of logged-in users should give you an idea of where to start. A google search or two should get you on your way.
Go to facebook.java class and change package name com.facebook.katana to com.facebook.katanaaa or any one of your own choice. This worked for me .

Integrating Facebook and Twitter feeds in Android application

I'm adding social integration to my app, and am looking for general advice how to go about it.
At the moment the app is showing feed of particular Facebook wall (authentication handled by Facebook's Android SDK) and feed for particular Twitter hashtag. That's a start, but I want these feeds to do a bit more. For Facebook:
For long feed items, user should be able to "see more", including linked pictures
Links inside feed items should work and open in browser
Like/unlike feed items
Comment on feed items
Post on the wall (create another item in feed)
Similarly, for Twitter:
Links inside tweets should work and open in browser
Reply to, and retweet tweets
Create tweets that contain the specific hashtag
Since Facebook and Twitter both have comprehensive APIs and there are enough code samples floating around, this is all technically doable, but seems a lot like reimplementing Facebook and Twitter clients. That's a lot of work to get all the little details right, maintain code for API changes,
and not really in the scope of my app.
So I'm thinking how to avoid reimplementing Facebook and Twitter clients.
Idea one: direct user to mobile versions of the respective sites and be done with it. Downside is that user will have to go through cumbersome authentication, even if there are dedicated client apps already installed and authenticated on user's device.
Idea two: plug into existing apps using intents system: if official Twitter app is installed, use that to do hashtag search. If Seesmic or Twidroid or some other twitter client is installed, use that. As a fallback, open Twitter's mobile website in browser. Similar for Facebook. Downside here is that intents for "show facebook stream" or "search tweets for X" are not standartized. Most current apps don't even have documented ways to plug into them. Using undocumented entry points in those apps is possible but would make my app hacky and brittle.
So, this question, how you've been dealing with integrating bits of Facebook and Twitter functionality in your apps, or seen done by others?
Here is a good tip about how to implement twitter/facebook oauth:
Create new activity and name it OAuthActivity.
Create new class that extends WebView.
Follow the facebook developer guide for WEB applications (not mobile ones!) and implement oauth calls inside of your WebView. For Twitter use Signpost-core with signpost-commonshttp4 to get oauth (facebook uses its own variation of oauth so you need to do it yourself).
Override WebView so it closes itself when facebook redirects your WebView subclass to your callback url.
Use OAuthActivity to return OAuth key / secret to your main activity via RunActivityForResult.
This way screen orientation change will work; you will have same architecture for FB and TW.
I have implemented it this way, yet I can not share my code (it is licensed for my company).
When I added Facebook and Twitter integration into my app (shameless plug: Secret Message), I attempted to invoke an installed Twitter client app via Intent. It wasn't fun, because there is no such thing as a "facebook/text" or "twitter/text" Intent. I know some Twitter apps create their own, but they're not universally used or even known.
So the other option is to get a list of all installed apps and filter on those you want to display in a chooser for the user to select. But retrieving a list of packages and their user-friendly names takes forever. So I hated that option.
I ended up integrating a very simple GUI for both Facebook and Twitter into my own app, and just used OAuth to authenticate users.
I hope this helps you pick your direction.
implementing Twitter integration is pretty easy on Android (you can use Twitter4J which is a pretty nice Twitter Java Library to access the public web services).
To integrate tweeting/retwreeting is basic stuff once you have authenticated your twitter user (just have a text box to allow users to enter thei 140 characters and a button to submit it - creating tweets, retweeting, replying etc is all a matter of 1 or 2 lines of code using twitter4J). The link stuff requires formating your listview to handle weblinks and open as appropriate.
The toughest part of the whole twitter integration thing is getting the OAuth stuff done - there is a tutorial on how to implement twitter and the OAuth authentication stuff here
Unfortunately, I have never tried facebook integration, but hopefully someone will be able to help out with that.

Categories

Resources