How to Invite friends for non-canvas app - facebook-graph-api

to make app viral,we want to invite friends using request (but it only works for Canvas app
We are having non-canvas app. What is the best available method to make it viral ?
[from the lots of facebook doc, i understand request only works for canvas app!, and not for website, correct me if understanding is wrong]
Currently we are taking publish_stream permission and sending to user's friends (after properly taking user's consent), but hitting by 341 error.
Is there any way out, so user's friends can be invited for non-canvas apps ?
PS: we dont want to send apprequest (which requires app Access token). We want to invite friends of user on behalf of user.
Anyone from FB here ?
Raxit Sheth

Related

invite friends via web portal in V2.0

I have a question regarding invite friends via web portal in V2.0
I have designed a website, where I have given a functionality to login through facebook.
If the user's logs into the website we get his friend-list for user's those are not using our application on facebook.
We have given the invite friends functionality to invite his(user's) friend to join our site using send dialog box.
I have implemented it in V1.0 but as I move to V2.0 I am facing problem in invite friend as follows. I am using Taggable friend's API.
I am not able to get the user's friend's USER-ID so that it can appear in TO field of send dailog box
In v1 I am able to get USER-ID but In case of V2.0 I'm getting some alph-numeric value
So in that case I'm getting Invalid parameter error for USER-ID
So My question is whether I'm doing some thing wrong or You havn't given the support for this yet.
If not, then I want to know till when you will give support for this.
Hope you will reply soon.
Thank you

Auto post on friends wall when user logged in using Graph API for first time

When first time a user logged in through Facebook Graph API APP, whether any auto post will be triggered to others wall on user's behalf regarding new APP first Login?
APP is given permission to read_stream, publish_actions.
That is not allowed and not possible for many obvious reasons:
You are not allowed to autopost, not even on the wall of the authorized user. Every single post has to be approved by the user.
You are not allowed to prefill the message, it must be 100% user generated.
You can´t post to the wall of friends (anymore), that would be spam anyway.
...also, you will not get read_stream approved, but you would not need that permission for posting anyway:
This permission is granted to apps building a Facebook-branded client on platforms where Facebook is not already available. For example, Android and iOS apps will not be approved for this permission. In addition, Web, Desktop, in-car and TV apps will not be granted this permission.
Source: https://developers.facebook.com/docs/facebook-login/permissions/v2.2#reference-read_stream
Don´t create spammy Apps. User friends don´t care if the user just started using your App. You may want to read this too: https://developers.facebook.com/docs/apps/faq#invite_to_app

How to get all facebook friends(who even not using the app) using facebook graph api [duplicate]

This question already has answers here:
Facebook Graph API v2.0+ - /me/friends returns empty, or only friends who also use my application
(8 answers)
Closed 3 years ago.
Im using facebook graph api to login to facebook and get all my friends names and ids, but im just getting those friends who are also using my app.
I want the list of all my existing friends whether or not using my app.
Please help!!
In v2.0 of the Graph API, calling /me/friends returns the person's friends who also use the app.
In addition, in v2.0, you must request the user_friends permission from each user. user_friends is no longer included by default in every login. Each user must grant the user_friends permission in order to appear in the response to /me/friends. See the Facebook upgrade guide for more detailed information, or review the summary below.
If you want to access a list of non-app-using friends, there are two options:
If you want to let your people tag their friends in stories that they publish to Facebook using your App, you can use the /me/taggable_friends API. Use of this endpoint requires review by Facebook and should only be used for the case where you're rendering a list of friends in order to let the user tag them in a post.
If your App is a Game AND your Game supports Facebook Canvas, you can use the /me/invitable_friends endpoint in order to render a custom invite dialog, then pass the tokens returned by this API to the standard Requests Dialog.
In other cases, apps are no longer able to retrieve the full list of a user's friends (only those friends who have specifically authorized your app using the user_friends permission). This has been confirmed by Facebook as 'by design'.
For apps wanting allow people to invite friends to use an app, you can still use the Send Dialog on Web or the new Message Dialog on iOS and Android.

posting on user's friend wall

i've built this application who keep in a database the uid of the users who used it.
when the administrator of the application is logged in to facebook and to the application,
he sees if a list of all the users who used the application, ordered by if they're friends with him on facebook or not.
the administrator has granted the publish_stream permission for my application.
i want do give the administrator an option to write a post or a link on the wall of a user which he is friend.
reading the graph api documentation i've found that i can POST to https://graph.facebook.com/uid/feed or https://graph.facebook.com/uid/links a feed.
from some reason i'm not able to do so..
can some please tell me what is the way to do so and what are the parameters i need to send to there api functions?
Im posting to /otheruser/links.
You should post it to /otheruser/feed. Facebook will automatically put your link into the link area.

Facebook user still logged in after logging out

I'm integrating Facebook into my application. A user in my app can either be authenticated via Facebook, or be authenticated by their account (email address + password) with the app. I have a page in my app where I pull Facebook friends list using FB Javascript sdk. I log into the app using Facebook authentication then navigate to the page and can see my friends list. I can then logout of app using FB.logout then login to the app using a different user account (email + password) then navigate to the page and still see my friends list. I've logged into the app using a non-facebook authenticated login. It's not a caching issue as I have no caching set up in my dev environment. I'm new to Facebook. Any ideas on why the friends page is still retrieving friends list? Thank you!
I doubt the browser is caching the friend list, unless your loading the friends list after the page is loaded via ajax. But even then it would be rare to see such a thing.
I've never used the js sdk. But i know with the PHP one it automatically stores the fb token in the session. However ive just had a thought, if your using the JS SDK, that probably means that your not using tokens like the PHP sdk does. I would guess that its because facebook is detecting the user as logged in ?
Try logging out of facebook after you logout of your own site, then login with a different account. If that works, then you need to google around and get the code for logging them out of facebook. I believe the old trick was to just header redirect them to the facebook logout url, but there may be a nicer way of doing this.
Having said that, this would log them out of facebook, so you might annoy some people. How often can you see people logging out to log in with a different account?