Post to Facebook user's groups using Graph Api - facebook

I want to know how to build a Facebook application that can allow me to post a specific message to all the Facebook users that are connected to this application. I searched a lot but I couldn't get an answer for this, I found a lot of applications that helps me send a message to MY groups only. What I need is when a user goes to my application and press Login With Facebook and give my application the required permission, a preset message is sent to all the groups he is a member of. Something like when I get connected to a game application, the application sends "Mrs. ... started playing .. game" to the groups I'm a member of.

I found a lot of applications that helps me send a message to MY
groups only
My is relative (like the "me" endpoint). Hence, anyone that logs into that app it will work for THEIR groups. Which is what you're wanting to do.
But beware: the functionality you're describing would fall under the definition of spam, as its the same post made for multiple groups without regard to the audience. Posts should only be in groups that cover a relevant population or subject matter. You'll get your app shut down for what you're describing.

Related

Can i send direct messages to my clients facebook followers using API?

I have seen services advertising that they can message the followers of pages and accounts on Facebook. I have gone over lots of different Facebook API's and several interesting threads on here but cant find a definitive answer.
Is is possible to directly message via a bot users who like a page providing obviously we have a valid admin token for that page?
Is is possible to directly message via a bot users who like a page
No, that is not possible.
All communication via the Messenger platform API (basis for “bots” in Facebook terminology) requires that the user initiates it.
And it would probably be considered spam by most people - just because I liked your page, does not mean I want to be contacted by you in any way beyond that. Posting to your page is the designated way of communicating with the people that follow your page.

Is Facebook now anti-social, or is there hope for connecting users with their friends via API?

My latest project has (had) a requirement for the user to invite their friends to their online service. I discovered that, apparently, as of April 2015 with the new v2.0+ Facebook Graph API, you cannot actually get a list of friends for the user, unless those friends are already subscribed members of your app.
The scenario:
My app is a web service that lets the user collaborate on research work in a private group online. The user needs to
look up their list of friends,
set permissions their friend will have in the group, and
send them an invitation both join the service, and the specific group. (using a unique, one-time use link tied to each recipient)
The user would (ideally) receive an invitation with a specific link for them to not just become a subscriber of said online app, but specifically to join the group they were invited to (i.e. not just a generic "hey, check out this app" type of invitation).
The expectation:
The user doesn't care whether their friend is already a member of "MyApp.com". They expect to simply look up their friends just like they do today from their phone when they connect it to Facebook (makes all contacts available, regardless of whether those friends connected their Facebook to their phone, respectively). Likewise, compare inviting members to your Google docs, for example: look up your contact, set permission, send invite - so easy. Users demand this UX simplicity today and do not distinguish or care whether they are dealing with email, Facebook, Twitter contacts, whatever.
The problem:
The entire point of a social network is to be, well, social. If the Graph API only lets my app access friends that are ALREADY users of my app, it completely defeats the entire purpose - it cuts my user off at the knees, kills UX, no more ability to actually contact their own friends. My understanding is Facebook made this change to prevent developers from spamming users, and I get that, I completely support that. HOWEVER, my company and my app are not the ones that are trying to invite friends for it's own purposes, it is the USER and THEIR OWN friends that THEY have the right to access and converse with for their purposes (or so you'd think). Beyond just friends list, even if I had that, I think there are additional hurdles and limitations with posting messages to friends, even private (not wall) messages, which again would be anti-social.
The Question:
Am I understanding Facebook limitations properly, and if so, what is the work-around? I'd be ok with such an API being locked down until you pass a review that proves you aren't spamming users, but I did not see such an option.
Facebook supposedly prioritizes users over developers, and these changes were made because if the user is not comfortable with privacy (don't spam my friends), then they wont be users any longer, and that obviously affects developers and Facebook. OK, but did they not realize that by locking it down this extreme just killed UX for the user in legitimate scenarios? And to my original point, not just a little, but paramount - the result quite literally is that on April 30, 2015, Facebook became anti-social. Surely this is not inline with their mission. Surely there is a better approach.
If your app is not a game (which I assume), the only viable option would be the Message Dialog as desribed at
https://developers.facebook.com/docs/apps/faq#friend_invite
If your app is not a game and has a mobile or web presence:
You can also use the Message Dialog on iOS and Android, or the Send Dialog on Web. These products let a person send a message directly to their friends containing a link to your app. This type of message is a great channel for communicating with a smaller number of people in a direct way. The Message Dialog and the Send Dialog both include a typeahead which lets the person easily select a number of friends to receive the invite.
You might also find App Invites useful but I beleive it's only for iOS and Android apps and might not exactly fit your use case:
https://developers.facebook.com/docs/app-invites
App Invites are a content-rich, personal way for people to invite
their Facebook friends to a mobile app.

iPhone App to read Facebook wall

I want to create an iPhone app that displays (among other things) a specific Facebook wall. For a good user experience I didn't want an app that required the user to have a Facebook account and I didn't want to force the user to have to log in to Facebook to see the latest "news" in the app. I started out by getting the wall RSS feed and tried parsing it ... I can "see" all the data I need ... but that is getting complicated quickly and has too many variables that are making the final results less than stellar. I have read through the Facebook iOS programming tutorials and it seems to me like the SDK forces the user log in, which I don't like.
My question ... Is there a way to use the Facebook SDK with hard coded profile credentials to access a specific wall without forcing the user to login? If possible, is that a recommended approach? Any other ways to skin this cat?
I have read through the Facebook tutorial and searched through many postings on this site but haven't found an answer to this ... sorry if this a newbie question and has already been answered.
Item I.2. of the Facebook API policy list says
You must not include functionality that proxies, requests or collects
Facebook usernames or passwords.
It sounds to me like that's what you're proposing to do; i.e., the user will be able to see a certain wall, but using hard coded credentials (not their own). In other words, your credentials are proxying for the user.
I do not know if it is technically possible to do this (I imagine it is) but I don't think it's a good idea, and I do think it's a violation of the Facebook API terms of service.
First you need to get the a access_token by parsing your app id and secret.
https://graph.facebook.com/oauth/access_token?client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET
Then send following request to get the data you want. Note that only public data will be accessible.
https://graph.facebook.com/FACEBOOK_USER_ID/?access_token=ACCESS_TOKEN

Workflow for dynamically adding groups for an application

I have done some research on how to check whether a user is within a specific group.
good post:
Restrict my facebook app from other members. But allowed to those who are in a particular group
What I need is to allow users to create there own group but use the custom objects and actions I provide. The custom object and actions describe or give boundaries to the application I am creating in Facebook. I think this is done in Mafia Wars ( you only play with your friends maybe? ).
Let me know your thoughts!!!
Markus
After further review...
I am going about this all wrong. The platform, Facebook in this case, is designed to segregate users already. It's called being someone's friend LOL. If a user logs into my app they will be presented with all of they're friends who have also acquired or accepted the app too.
In other words I need to really read the Facebook API in it's entirety and pay attention.
Markus

Invite Facebook users at first launch

I'm considering developing an app that asks users to invite friends to participate at first launch, using the Request dialog. (The Request dialog would have a prominent Skip button, in agreement with Facebook policy IV.4.)
Browsing this forum, it appears that there USED to be a "Developer Policy V.4" which, at one time, said this: "You must not prompt users to send invitations, requests, generate notifications, or use other Facebook communication channels immediately after a user allows access or returns to your application."
I no longer see language like that in the policies available here: http://developers.facebook.com/policy/
Does this mean that prompting users to send invitations at first launch is now allowed? Or am I simply overlooking some language in the new policies that forbids this?
I believe this was removed intentionally, as it clearly isn't in their updated developer policies. The only mention of that old policy I can find is here. That post also gives a good reasoning for the old policy:
When a user -- whether returning or
new -- visits your application, you
must allow the user to engage with
your application before asking him/her
to publish a stream story, send out
Requests, or use any other
communication channel. The intention
behind this policy is to give users
the opportunity to meaningfully
interact with an application before
being faced with the decision of
whether to communicate with friends.
The advice is still valid even if the policy is no longer in place - that you should give the user a chance to use and learn about your application before being prompted to share it. However, if you are building a game like Words With Friends where you need to play against one of your Facebook friends, then I think it would be fine (almost necessary) to invite friends right away, and this may be why Facebook removed this from their policy.
I think you will be fine if you prompt a user to send friend invites immediately, provided its not for the purpose of spamming other people to get them to use your app and that you provide a skip option.
Also, its sad that its near impossible to get a response from Facebook like you have seen with their forums.