Send Facebook message from application - apache-flex

How can I send a message to the currently logged in user from inside a Flex application contained in a Facebook iFrame and using the official AS3 Library for Facebook please?

To date the Graph API is the easiest way to work with facebook.
http://code.google.com/p/fbas/
It's far from a complete implementation, but Graph is so simple it shouldn't take long to implement any features you need.
NOTE: When I've used it I ported the javascript portion of the example code on the project's main page to AS3 & ExternalInterface. It reduced external dependencies to zero (with the exception of swfobject)

Facebook does not allow you to send messages . Either way , you can post to the user's friends feed on behalf of the user , with a custom message and the the notification for the post in feed will be displayed.
Post your request to http://graph.facebook.com/PROFILE_ID/feed
Requires the publish_stream permission.
You can refer this link http://facebooksdk.blogspot.com/2011/04/facebook-album.html

Related

Flutter - Create sharable profile link

I am trying to create a Social media kind of networking Flutter app in which user can share his profile link. That link must redirect directly to user's profile if app is installed else redirect to link to download app. I am using Firebase as backend. Any resources or packages to work with?
You can use the package Share to enable the user to share their profile themselves. Its really easy to use.
If you would like to share a profile you will need to provide the navigational route to get to the profile screen, then provide the user's ID/data to get/view the desired data.
As far as getting a deep link to get the user to download the app if it is not installed, you can use firebase's dynamic link feature. You can customize what the link preview looks like and says. They have really good docs that you can follow.
You could use a Firebase dynamic link.
A dynamic link is basically a link pointing to possibly 3 resources:
Web URL
Android (Google Play) App ID
iOS (App Store) App ID
So once you configure it on Firebase (it's simple to configure), when the user access the link, Firebase will employ a decision tree to decide where to send the user.
In case the access is done on a mobile device, but if the app is not downloaded, it'll send the user to the store, and after returning from the store, will send the user to the correct path you've configured, following the link.
And on the app, you can implement the SDK to handle this link and when receiving this route request, redirect the user to the right profile they want to access.
I could go through the whole process, but I suggest you check the whole Firebase documentation:
https://firebase.google.com/docs/dynamic-links
In case you have a question on that where I can explain further, just let me know.

Firebase dynamic links not working for Firebase sign in with email link (password less)

I'm using Firebase sendSignInWithEmailLink with the url generated as part of the Firebase dynamic link.
The firebase dynamic url looks like:
e.g: https://myapp.page.link/H1c4
The url from step 1 is sent as part of sendSignInWithEmailLink
User received email and clicks on the verification link.
At the end of redirection I can see that the url contains the oobCode as shown below:
https://myapp.page.link/H1c4?apiKey=&oobCode=YG2N2eLU4qGBsDeLU5cVsDrzF9qwkGzoUepInuA9pm0AAAFtfk41Nw&mode=signIn&lang=en
When my app receives the dynamic link finally, it is loosing the oobCode. My app gets
https://myapp.page.link/uEOBUnv1k4XclzwfsT5NXnGBgAA3/
The part after link/ is a custom data which I used while generating the link in step 1.
When I use isSignInWithEmailLink for validating the link in step 5, I get the result as FALSE indicating it's not a valid email link.
But if I provide the full URL from step 4 in the code(manually), the isSignInWithEmailLink returns TRUE.
I think I've done all required but Firebase dynamic link is not persisting the oobCode as part of the link sent to the app on the device.
Has anyone seen this and know what could be the problem? keen to get feedback here before reporting as an issue in Github.
Cheers
Are you using a custom dynamic link with a path, eg. https://myapp.page.link/H1c4? If so, that is currently not supported with Firebase Auth. Only custom domains with no paths are supported, eg. https://myapp.page.link.

It is possible to authenticate in Yammer and Outlook with rest api?

I am trying to integrate Yammer and Outlook using the Rest API, I can read the emails but I have an error returned when reading data from yammer. The documentation is unclear about it, can they help?
You need to follow one of the authentication flows outlined within a browser window.
Typically you would popup a window with a browser control to do this work and then securely store the OAuth token returned. I recommend working through the flow by hand before writing code to integrate it. It is expected that a user sees and has to agree to an OAuth dialog like the one shown.
You then pass the token on the authorization header like this with your HTTP requests:
Authorization: Bearer TOKEN_HERE
Perfect Brian, but I'm using Graph's endpoint, I'd like to use Outlook and Yammer together.
var authEndpoint = 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize?';
var apiEndpoint = 'https://graph.microsoft.com/api/v2.0';
I would not like to authenticate again, is it possible?
You'd need to add resource=https://www.yammer.com param to the authEndpoint to be able to access yammer data. See this blog post for further details - https://blogs.technet.microsoft.com/israelo/2016/07/05/yammer-apis-and-adal-tokens/

Facebook App to Post HTTP GET to Timeline

A lot of the documentation online is pre open graph, and I find the Facebook developers documentation quite confusing (I'm a novice developer). Can someone please tell me, at a high level, how or where I might find out how to go about creating an app in Facebook where I can post to my business' page timeline through a single encoded HTTP GET (or similar) request.
I understand I might have to make a simple FB app and authorize it to talk with a separate web app. But I'm just looking at pointers at this stage.
well it isn't quite correct that you can only find pre-open graph things on Facebook. Anyhow, to post, you need an access token.
What you seek to do is update your fan page via app, if I get it correctly.
That isn't done with just one url: you need to call at least two:
1) one call is to authorize the app and get an access token
2) the second call is to get your accounts (fan pages) with ids and access tokens
3) the third call is to update your fan page via app.
The url to post via app would be https://graph.facebook.com/$your_id/feed with the following parameters: access_token, message (the message you want to post, not required), link (if any. Not required.), image (not required), description (not required), caption (not required), etc. You need at least a message or a link for the post. If you use php the easiest is a curl POST call. I've found something for you here, by the way

Facebook API Auto accept friend request

I've created a web application that uses the Facebook API.
I would like to implement/create a method which is able to auto accept friend request of my own Facebook account.
Is this even possible and how to implement it in C#/ ASP.NET MVC?
Thank you in advance!
*I alreay read the Facebook Developers documentation https://developers.facebook.com/docs/howtos/requests/ but haven't been able to solve my 'problem'.
There is no API to send or approve friend requests.
There is the Friends Dialog but it sounds like you want this to work without user interaction which is impossible.
If you find some way to do this, you should report it via Facebook's whitehat bug bounty program, as it indicates a bug on Facebook's side.

Resources