Posting to wall with Android facebook sdk 4.5.x - android

According to this documentation adding a publish permission to my android application, it uses Session class which is deprecated now. Can anyone tell me what is the updated way to achieve this? I want to post something on the user's wall with my app. And I found this is the way to post something on user's wall, to simply make a POST call on this url:
graph.facebook.com
/{user-id}/feed?
message={message}&
access_token={access-token}
Is this the correct way or is this somehow deprecated too?

I don't see the word "Session" occur on the page you are referring to.
Regardless, you can read the "Sharing on Android" docs page to learn how you can publish content from Android devices.
The recommended way of doing this is by using the share dialog, because that does not require users to grant any publishing permissions. Since you have to include the SDK anyway in order to implement Facebook login, you might as well make use of this feature.

Related

Getting facebook read and write permissions in a single dialogue window

Is it possible to request both read and write facebook permissions from the user through a single dialogue window? I read that facebook consider it bad practice to request both read and write permissions from the user at the same time, but in our situation I find it optimal. I have been through their requesting and revoking page.
We are currently developing an endless runner game for mobile using Unity 3D in which we integrate facebook using the Unity SDK provided by facebook themselves.
At the end of the run, the user is asked to connect to facebook to compete against friends. In this case read permission is needed to get scores / friend profile pictures while write permission is necessary to upload the user's score. Having to prompt the user twice in this situation seems like a bad user experience.
When we implemented the Facebook API it simple would not work if we did not follow the facebook guidelines of first getting read permissions and the write permissions and I am also pretty sure that their documentation states it, even though I can't find the exact passage at the moment.
I would consider using the Prime31 facebook plugin, thats what we used and it has (atleast had) method calls for handling this double prompt as smoothly as possible. (its called Social Network plugin here: https://prime31.com/plugins)
You could consider giving the user a nice currency reward for doing it so it does not seem as that much of a hassle for the user.

Facebook SDK - Getting all users that use the application

I don't know what you guys think, but I believe that the Facebook SDK documentation is very limited and doesn't explain very much; Luckily throughout the use of some videos I was able to set up most of the integration that I needed.
However my application doesn't interact with just Facebook friends. It interacts with anyone and everyone using the application. Meaning if Jim and Sally aren't facebook friends, they can still see each-others profile picture, age, and name.
I'm not asking for you guys to write this out for me, but a nudge in the right direction would be lovely, perhaps accompanied by a link.
There is no API to "get all App users", you would have to store each user in your own database. Of course you have to deal with users deauthorizing your App - you can do that with the "Deauthorize Callback URL" in the advanced settings of your App.

How to Hiding application source when posting to Facebook page via graph API

I've successfully posted to a fan page as the actual page via the Graph API.
The problem is that the post says it was posted at "time via application name". Is there any way to hide this, so my post looks exactly as if I typed it directly into Facebook?
Any help appreciated
Short answer: No.
Slightly long answer:
Unfortunately, if such a feature was to be available, it would have to be made available by Facebook via their SDK / API. As of now, however, anytime anything is published via any third-party application, they will continue to bear the via application name stamp on their posts.
Why I say that Facebook will have to implement such a feature is because Twitter did exactly that. Sometime in mid 2012 I think. This was possibly done to bringing parity across the entire platform. * Source: http://thenextweb.com/twitter/2012/08/28/twitter-longer-displays-client-tweet-posted-web-emphasizing-first-party-reading-experience/*
I suspect this is because you can only do a limited set of actions (when posting on Twitter) as compared to the Facebook platform. On Facebook, you have several choices when posting content to the platform. Images, Videos, Links, Status updates. And I am not even counting the Open Graph actions.
You could consider filing a feature request to Facebook. If they think the suggestion merits inclusion, they just might do it.

Importing google user profile to remote db on android

I'm building an app on android that has the features of Log-in with facebook and Log-in with Google. Assuming the user chooses to login with google, I would like to ask for permission and collect basic information such as name,age,sex,location,email from his profile and save it on my server's database.
Here is the problem: Which api should I actually use to grab these info? I don't think google+ api would be a proper choice since not every google user has one. After checking Google-api-java-client documentation, I still cant find anything useful.
There seem to be no library for this basic operation.
The only thing that seems relevant is Google Apps Profile API but
1. it's outdated.
2. Its not free.
I'm too confused and I hope someone can guide me through this nightmare.
Edit: found some new relevant info but I'm still hoping to find an official java library for this:
https://oauthssodemo.appspot.com/step/1
Found what I was looking for: http://javadoc.google-api-java-client.googlecode.com/hg-history/c35433d3077dc4eb89dccb25618dc70dbd375d65/apis/oauth2/v2/com/google/api/services/oauth2/model/Userinfo.html

Modify the Facebook account or privacy settings via an Android App

I am developping an Android application that uses a Facebook component. It would be something to simplify the management of the Facebook privacy settings with the user only having to push 2 or 3 buttons to apply a whole set of privacy parameters to his/her account.
For example, by pushing the button "paranoid", my settings change as:
default privacy for new wall posts = only me
secure browsing ON
...
And by pushing "free givaway":
secure browsing OFF
default privacy for new wall posts = everyone
...
Just an example.
I'm just beginning, so I had a look at the Facebook SDK for android, implemented the few examples like the Hackbook, etc.
But I'm still wondering how to manage privacy settings. I understand it would be a security concern to let an app manage that kind of thing, but why not?
Since I couldn't find a clear answer inside the bowels of internet, my questions are:
Is it doable? Or even partially?
If not, why? Will it be possible in the future?
If yes, how? What part of the API should I use?
Thanks.
This is not doable via the graph API because managing settings isn't available to write/update. I am almost positive this will never be available via the API. The Facebook native app may or will allow this but Facebook itself makes that app and doesn't use their own api for their app.
If you really wanted to do this, you could break Facebook's terms of service and do this via scraping Facebook's desktop site.
https://developers.facebook.com/docs/reference/api/post/
From Above link : The value field may specify one of the following strings: EVERYONE, ALL_FRIENDS, NETWORKS_FRIENDS, FRIENDS_OF_FRIENDS, CUSTOM

Categories

Resources