I have a web site and I want to give a opportunity to users to invite their facebook friends to this web site.
I have:
C# Facebook SDK installed to project
Facebook Dev Account with new app
Users at my site use site's auth control (not oAuth). They register on site and can connect their Facebook profile.
The question is next one: How to allow users to invite their friends to web site not using facebook oAuth (just sending user id) with Facebook C# SDK (or without if it's not possible in this way)
UPDATED
I want to do this in next way: user click the button "invite friends" (standart invitation screen of FB), check friend, click invite - finish action :)
Thanks a lot!
I think you should look at the Requests dialog here: http://developers.facebook.com/docs/reference/dialogs/requests/
Only drawback is, that when users accept the request, they'll be shown your Canvas URL - which means this page loads inside the Facebook UI - they're not redirected to you site entirely.
You could use this page to "sell" your website, so they navigate to your site.
Another approach is using the new Send button: http://developers.facebook.com/docs/reference/plugins/send/
This will send a message with a link to your site.
I dont think that is possible. Becuase to access user private data you need to authenticate yourself as well as user with facebook. Facebook provides OAuth for the same !
Related
I’m using Facebook login and share on my website.
Now I have at second website, and I want to use the same Facebook for developers account / App.
I want to show the information from the different website.
Is it possible to have to domains on one Facebook for developers? Or is there a workaround on this?
I using HTML5 with AngularJS on the client and C# MVC 5 back end.
Could I change the Facebook for developers account / App Id back end in StartUp.Auth by looking on the calling domain? Then I just have to create a new Facebook App.
I am developing a windows phone app using facebook c# sdk. I created a login page to authenticate the user and it also working well. But my problem is, next time when the user open the app, it should be navigated to main page and do the authentication work in background. Is there anyway to do this??
I used navigatedto override method to "redirect the user into the mainpage". I dont know how to authenticate the user in background. Help plss..
save token (received from fb) in ur isolated storage & check if it invalid in ur HomePage and so accordingly navigate to Login (if invalid)
I have a problem with facebook and google logout. My scenario is when user first time login with facebook or google for particular site.(using clint api, it will redirect to their own web browser). then it will show the login page . after successfully logout if again login with facebook or google i m trying it's not showing the login page , it directly shows the login success message.(because webbrowser history already there, and i am not able to delete the history) so in this situation multiple user can't login with facebook or google.
have anyone idea? how to solve this problem?
On WP7 you'll have to use InvokeScript and javascript to logout and/or get rid of cookies required by different services like FB and Google. Fiddler comes in handy for this.
If I remember correctly, for Google you'll have to watch for specific URL's and cancel navigation, run InvokeScript and continue navigation.
I worked on a project that accessed different providers and this was the solution we were able to get working.
On WP8 there is a method to clear cookies.
Try finding out if there is an OAuth or API url for logging the user out such as
m.facebook.com/logout.php?confirm=1&next=(url encoded login page)
to navigate the user to.
I have a problem with inviting friends to my application. I tried
with Stack Overflow question Application generated apprequests failing in Silverlight, but it works only when the user already has that application. If not, I get an exception:
(OAuthException) (#200) All users in param ids must have accepted TOS.
So I want to inivite a friend directly through the C# SDK in Silverlight application by user ID, not Facebook dialog box. Is it possible to do this? I'm googling for two days...
For requests without a dialog box, your app can only re-invite user ids of people who already use the app, in an attempt to get the user to re-engage with the app. See the app to user section of https://developers.facebook.com/docs/requests/
App to User Requests can be used to re-engage a user in your app and
can only be sent to users that have installed the app. For example,
notifying a user that something has changed since their last visit,
"10 of your friends are now online".
App to User Request are sent via the Graph API, for more information
see the apprequests docs. App to User Requests are only available for
Canvas apps, not websites, as accepting a request will direct the user
to the Canvas Page URL of the app that sent the Request.
As you can see from the error message you received, that it is not permissible to do this to ids that have 1) never authorized your app or 2) someone who authorized your app, and then subsequently removed the app.
Happy Coding.
It is possible to request a dialog from facebook to invite non-app users.
Do have a look at my answer here.
Is facebook user to user request possible with W8/WP8 c# sdk?
Here's a little bit about my situation:
I want to be able to retrieve a list of emails for the friends of a given user.
Here is how I would like the process to go:
A div box pops up with a login (used to log in to their facebook account, not my website's account system - that is separate)
Then once the user has entered their facebook credentials, they will have a button appear.
Send email to all friends.
If they click on this button I would like an email sent out to all of that user's friends.
Questions:
I only want to pull out emails from a user's friends, so...
1) Is it actually a facebook app that I'm creating?
Many of the tutorials talk about facebook apps and how you have to go to facebook and create an app from there and set all of these settings for page redirects and such. I didn't think I wanted it to be an app, all I want is the information.
2) If I do need it to be an app, how is it supposed to interact with my website? Some talk about iframes, or other methods... How am I supposed to know which to use and how I can integrate it into my site?
You have to create app through facebook, but it's only for autorization information.
api key
api secret
And you have to few options for working with facebook API from C#
Facebook Developer Toolkit
.NET Facebook API Client
Facebook.NET
Bemmu is correct = you can't use facebook to get email addresses.
You can send a facebook messages (which usually sends an email to the recipient as well depending on the users preferences).
You'll need to build a facebook app, and get users to allow it to access their profile information (default request). Then you'll be able to sendNotification to receipientID's.
Start with http://wiki.developers.facebook.com/index.php/Notifications.send and look at other references to the Stream API.
Do read the guidelines and agreements - there's rules on how long you can hold onto stream data and what you can use it for.
Let me add to that the PHP API:
http://wiki.developers.facebook.com/index.php/PHP
http://developers.facebook.com/get_started.php
There are no API methods to get anyone's e-mail addresses on Facebook, and neither are there on OpenSocial. This is so that the e-mail addresses do not end up on spam lists. There is a way to send e-mail without getting to know the actual addresses though. If you get the user to accept extended privileges for your app, then you can send e-mail at some reasonable intervals to that specific user.