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.
Related
I've read some related questions, but they are not 100% related, as the requirements vary a bit.
I have a .NET5 web application, some kind of custom CRM for the company I work in.
We have multiple users (employees, my colleagues), which can create quotations, etc.
Also, they can send these quotations to customers. Every user has its email account name attached to it.
The current way this application works is that I've created and enabled Gmail API for each email account, and authorized it, by myself, manually.
The problem is that every time we need to add a new user (new employee for instance) - I need to enable Gmail API of his email account (company's one, but it doesn't matter), add the credential file and token manually to the server, authenticate it, and only then - the application can use the email.
I know that there are many sites (like Monday, etc) - that have automations and integrations with Gmail, and any time I want some integration - I get notified with the OAuth screen, and approve it. I want the same thing in my application.
I understand that I have to create some kind on "Gmail global credential", which will be "added" with account tokens or something like that (every app user will oauth and allow access)?
Just can't find the correct documentation for it.
My backend is written in Blazor Server, .NET5.
I would appreciate if one could explain the main stages of this procedure.
Thanks!
I'm trying to create a program that sends messages to groups from time to time. If I'm not mistaken, the only API I see that send messages is "Create Post" which is the "Team Messaging" section. This API uses Glip permission. The test messages that I was sending is being sent to the developer Glip-App account, when I logged into the Glip-App account, the page didn't look like the regular RingCentral app. The UI is different. I have a feeling, that I am working on the wrong API.
I also have few more questions. My program is only required to send messages, but in order to apply for production, I have to practice other API calls as well, such as Get, Delete, Update etc. I'm not sure why it is like that. Also, I had to practice all the permission given, but the only permission I have given is Glip and it's still in the red.
Finally, the test messages that I've sent, showing the user's actual name on the Glip App page. Is there a way that I can use an alias?
The test messages that I was sending is being sent to the developer Glip-App account, when I logged into the Glip-App account, the page didn't look like the regular RingCentral app.
There are two developer sandbox accounts for RC App now, one for the new App and one for the legacy app. At this point, you should be using the new URL. The legacy URL still exists for testing purposes and will be retired at some point in the future at which time the URL should redirect to the new URL.
New: https://app.devtest.ringcentral.com/
Legacy: https://glip-app.devtest.ringcentral.com/
My program is only required to send messages, but in order to apply for production, I have to practice other API calls as well, such as Get, Delete, Update etc. I'm not sure why it is like that. Also, I had to practice all the permission given, but the only permission I have given is Glip and it's still in the red.
This should not be the case. Please contact the support team regarding this.
Finally, the test messages that I've sent, showing the user's actual name on the Glip App page. Is there a way that I can use an alias?
If you are posting using the credentials of a user, the user's name will show up since the user is being represented, not an app. You can also post into a team using a webhook or chatbot in which case other names will appear.
I'm currently writing a facebook app for windows phone, and there is something I just didn't find how to do.
Since display=touch currently doesn't work on windows phone, I am forced to use display=popup to get a token and the user's agreement for my app.
This popup mode really isn't fit for mobile apps, so I would like the user to be able to check a box saying "I would like the app to remember my login and password and connect me automatically".
However, when I have the user's login and password, I don't know how to use the OAuth API to effectively login the user without him having to click anything. Is there a way to do that ? Or do I have to wait for the user to choose "Remember me" on the Facebook login page ?
I hope that was clear enough.
Facebook doesn't have a (public) API for taking a users email address and password and returning an access token. The closest thing you can do is customize the HTML that gets returned with JavaScript. I have an example of this on my github.
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?
Say I have 3 google accounts and 3 facebook accounts and want to an webapp for viewing the inbox / events for all 3 accounts together. Would that be possible?
I can think of the following options:
Using the javascript api's only. (Don't know if it would be possible to have multiple users authenticated at same browse session or switch between the users without reentering passwords?)
Merge the inboxes / events on server using some c# api for gmail and facebook. Would those api require a browser session, or would it be possible to store some sort of a authentication token?
Thanks a lot for any suggestion!
Larsi
It is definietly possible to do that with Facebook by using its OAuth authenitcation and corresponding service calls to retrive data. I don't know if gmail supports something like this.
Facebook API/Auth reference: http://developers.facebook.com/docs/authentication/. Note that you'll either have to call services yourself or have one application Id per account you want to pull data for as library provided by Facebook stores user information in cookies named with application Id as prefix.
You need two separate browser sessions, possibly storing cookies in different places (if you want to remember who's logged in) to be logged in to these websites as two users at the same time. Some of them will even free up sessions by examining the IP address; if the same IP has two or more open sessions, all but the youngest are discarded.
The idea is, a computer is used by one person, and that person is supposed to be one user and interact with the web app in one session. That allows for the best overall use of resources. There are very simple ways to enforce this server-side, that are hard to "game" client-side.