Do Facebook Messenger Extensions work in the desktop browser? - facebook

I have not been able to determine this from Facebook Messenger documentation.
Do messenger extensions, as described here, work on desktop browsers? Or only on the mobile apps?

I'm using the MessengerExtension v2.1 and it can work on both desktop (Facebook Messenger Web App) and mobile (Facebook Messenger Android/ iOS app).
This is something the documentation never mentions at all, at least not at this page /webview/extensions.
I'm totally aware that adding those said headers are not going to work since those headers are completely blocked in the Facebook Messenger web app thus they are ignored no matter what.
I've found a way to make it work instead of following the documentation.
window.extAsyncInit = function() {
/**
* NOTE: getContext works on both dekstop and mobile.
*/
const APP_ID = '<YOUR_FACEBOOK_APP_ID>';
MessengerExtensions.getContext(APP_ID, (uids) => {
/** Do more stuff here */
}, (error, errorMessage) => {
console.error('Error occurred -', errorMessage);
console.error(error);
});
};
Hope this helps!

Facebook Messenger Extension now support both mobile and desktop. Facebook introduced this desktop support on their latest update on messenger platform V2.1. Here is the complete list of new updates in V2.1 on facebook messenger platform.

Related

Sending URL using Facebook messenger from my Mobile Website

I am looking to send some link over Facebook Messenger app from my mobile website on Chrome Browser on my mobile. I am using the facebook messenger's custom URI Scheme fb-messenger://share. I saw this option on the the following link: Custom URI Schemes for the Facebook Messenger I used the full url as: fb-messenger://share?ShareType=ShareType.regular&share_story_url= I tried multiple options for share, as mentiond in the link above, but nothing works. It tries to open the app and closes.
You can do it by adding the following link to your page:
I don't know what else you can pass except for the link, maybe a user ID with to (probably the same params as described in the dialog method
i'm facing same issue and this is not working in ios devices.
In android devices its working fine.
I have used this one:
fb-messenger://share?link=" + smsString; (smsString is var)

Upload Image to Facebook from phone via share dialog using JS SDK

I am creating an app using Cordova and the Facebook plugin, which means I have the functionality of the Javascript SDK. How can I upload an image using the share dialog. I can share texts or already uploaded images via links. But is it possible to upload images via the share dialog?
I can upload images using the Graph API, but it has the disadvantages that I have to ask for permission to post on the timeline upfront, which is a bad user experience in my opinion.
Thankyou in advance!
I suggest you can use facebook plugin for cordova which covers all of your needs.You can download from (http://plugins.cordova.io/#/package/com.ccsoft.plugin.cordovafacebook) .It needs Android facebook SDK,download from (http://developers.facebook.com/android/).
Here is the share function form this plugin that covers your need(I suppose).
function share() {
openFB.api({
method: 'POST',
path: '/me/feed',
params: {
message:"Facebook ApI test",
link: 'http://www.example.com/loc8',
name:'Facebook Api Test ',
//image that share in posted in user timeline
picture:'http://www.example.com/Test.png'
},
success: function() {
alert('Image Successfully shared in facebook');
},
error: errorHandler});
}
Also you can pass the image as argument like this
function share(image){
//do the facebook share stuff
}

Facebook graph-api and js-sdk issue with internet explorer 9-11

I'm having some issue in making social feeds work under ie9.
in this page http://www.axo.com/us/news/ there are the standard Facebook and twitter feeds widget and in ie9 are both not working.
At this other page: http://www.axo.com/us/fbfeed I'm developing a custom Facebook feed following this tutorial http://tutorialzine.com/2011/03/custom-facebook-wall-jquery-graph and I get a white page under ie9
this jQuery plugin use the direct call to 'https://graph.facebook.com/pageId/posts/?access_token=XXXXXXX&callback=?&date_format=U&limit=15
I've read some post that sudgest to use the javascript SDK instead of calling graph.facebook.com. I've made a try
jQuery.getScript('//connect.facebook.net/en_UK/all.js', function(){
FB.init({
appId: 'xxxxxx',
});
var pageAccessToken = 'xxxxxx';
FB.api('/axoracing/feed', {
access_token : pageAccessToken
}, function(response) {
alert("FB.api response")
});
});
but under ie9 the alert doesn't show... so I imagine the call to /axoracing/feed is not getting an answer.
even more strange: if I try to console.log() something it doesn't work in any browser (firefox, safari, chrome, ie, ...). It is really odd and it will be a mess to use the responded object if I can't log it!
I'll really appreciate any help.
Thanks
Daniele
IMPORTANT UPDATE:
For debug purpose I made a test page that call the graph api, the sdk api and the Instagram api. Instagram and graph.facebook calls work in the same way so I inserted the instagram call to check if the issue is in the capability of IE to understand the responded json (I've read this in some answare here in stackoverflow) or if it is an issue only related to facebook.
http://www.axo.com/prova.html
If I look at this page with chorme, firefox, safari and even ie7 it works fine. If I load the page with ie9 or ie11 I get only the instagram feed... no response at all from facebook!
I haven't tested ie8 or ie10 yet.
Do you have any idea? I can't believe it is a facebook incompatibility with ie... I'm sure I'm making something in the wrong way, but what?
Thank for the help
Daniele

facebook page: where are our apps listed

I have created an facebbok app for a client. The app works fine.
But the app is not listed on the client's facebook page. The client wants it to be listed.
Is it possible to list a fb page's registered apps on the fb page?
(see screenshot of their page and app here)
Not sure what you mean by list, but I'm assuming you mean you want to add the app to the page. You can add the app to the page using the FB JavaScript SDK and the following code:
var obj = {
method: 'pagetab',
redirect_uri: '[url_to_your_app]'
};
FB.ui(obj);

Facebook Share not working while logged in with Facebook Connect

I have a Drupal 6 website where I've implemented Facebook Connect with the JavaScript SDK and it's been working fine for some months.
The site used the old Facebook Share button (pointing to sharer.php) but that didn't work with the new Facebook Connect API so I replaced it with fb:share-button.
My problem is that the Facebook share button doesn't work for users logged in via Facebook Connect. The lightbox for Facebook Share appears empty with just the loading bars. If the user is logged in to the site as a non Facebook Connect user then Facebook share works normally.
I've searched for similar problems and found an unanswered post at Facebook developer forum that looks like a similar problem.
This site also uses Facebook Like buttons but those, as far as I know, don't allow including an image from the liked image like share does. The owner of the site needs Facebook Share and has no plans of removing it to work just with Facebook like.
Any suggestions?
Thanks.
I got this code working for sharing
function share(){
var share = {
method: 'stream.share',
u: document.getElementById('txtShare').value
};
FB.ui(share, function(response) { console.log(response); });
}