Posting on social media accounts in React Native APP - javascript

In my react native app, I get Message test and ImageURL string from server, which I need to share on FB, TWITTER, GOOGLE AND INSTAGRAM.
Note that, I am looking for libraries that works with both android and ios and able to share to all share media and should give some callback, so that I can get the event whether the image has been posted successfully or not.
I tried searching on net and also tried few libraries also, but I didn't got the expected outcome.
Should I have to use SDK for each social media? let me know your ideas, how should I proceed for this.
Thanks,

you can use Share library of react-native, that will open a dialog to share text content containing links and other text stuff.
docs will be available here.
And if you want to share other stuff too, then you can use react-native-share module, that provide to share text + multimedia content on social apps.
If you want to share only text content then i recommend you to use Share library of react-native.

Related

How do I implement WebGazer.js into a website that I didn't create?

I'm trying to do a usability test a website with WebGazer.js. I'm doing all of this using javascript. The problem I'm facing right now is I didn't make the website, someone else did. I don't have the source code, thus I can't put the library into the source code of the website. Now, I'm trying to find a way to use that library (assuming the library is an API as well) to the website, so the users in their home can open both WebGazer.js and the website at once
I've implemented WebGazer.js into my laptop and test it through the examples this website: https://webgazer.cs.brown.edu/ has gave us. I also have used React and node.js to implement and open it into my localhost:3000. Now, my challenge is that how do I implement what I have to a website that I didn't create. For example, how do I implement WebGazer.js to Instagram so that the participants in the usability test can open their own account and we do a remote usability test and WebGazer.js is able to record their eye movement?

Force facebook to open link in external browser for smart phones

How can I post a link to my website in a Facebook post, and have it open in the user's external browser when using smartphone app, not Facebook's native browser, which is not displaying properly? My page is http://www.hannabery.com
On Android, you can use Firebase Dynamic Links to let user open specific URLs by external browser. I guess that Android webview is equipped with some Firebase SDKs, so this method only works on Android. User still opens link by in-app browser on iOS.
Create a project and a domain for dynamic links
Manually create the link like: https://DOMAIN.page.link/?link=YOUR_DEST_URL
(Or there're many other ways to create links)
For example, post this link on Facebook or Messenger and try it:
https://fugle.page.link/trade-landing-page
Note: Dynamic Links are mainly used to provide consistent and smooth UX across platforms and app installs. This is just a side effect I discovered may help to answer the question, and it may not last long and so should not be taken as the final solution.
Hope that this way can help you:
var ifc = document.createElement("div");
ifc.innerHTML = `<iframe src='${browserScheme}${target}' style='width:0;height:0;border:0; border:none;visibility: hidden;'></iframe>`;
document.body.appendChild(ifc);
Full sources and example: https://github.com/huantt/force-open-browser/tree/master
https://github.com/huantt/force-open-browser/tree/master I thought this one only worked when link is sent on messenger. But any link clicked on fb messenger is going to ask what browser you prefer. I used the code on my page and I posted the link on FB and it is opened by the FB browser. How annoying :(
This cant be done (for obvious security reasons) but there are ways
1.Create an app for your website
If you create an app for your website then theres no need for facebook in the middle of things
2.Create an app displaying facebook page
As long as its your page and not something misleading then this is allowed and you can do some pretty neat stuff in android studio
for example if you post a like
mywebsite.com/forum/
theres this cool function you can use .endsWith("/forum/") from there you can make your application do ANYTHING when a link is clicked that ends with "/forum/"
A few things ive done
Redirect to that link
open browser to display link
Move to portion of app
Display dialog boxs
and theres much more your able to do
If you are having issues with your PWA not running correctly in Facebooks (insert expletive) Mobile Browser. Using dynamic links will force it out to the regular browser. Don't use your custom domain though. Use https://YOURDOMAIN.page.link instead
https://firebase.google.com/docs/dynamic-links/custom-domains
also DO NOT skip the preview page!

Customize 'share' message in Google Chrome

I want my website to enable people to share their score via instant messengers.
So there is this nifty feature where you can share websites in Google Chrome on Android
with other people (on the screenshot it says 'Teilen'):
Right now all it does is for example messages people on whatsapp the title of the webpage and its URL, so I wondered if I could somehow customize this behavior.
So, is it possible?
Also, is there a way to trigger this share functionality via javascript?
It is not possible to influence this directly from a website, but there are two things you can do.
Change url to highscore specific score
As soon as the user get's a new score use the history API .replaceState function to change the URL to a URL that for others will load a page with his highscore. And set window.title to what you want the title to be (though make sure this is something sensible for the player as well).
Triggering the share dialog from code is not possible.
Cordova (+crosswalk)
If you really wish to trigger the share dialog from code you would have to bundle your application as a native application using Cordova (and crosswalk if it's a game). There are next various plugins that expose the share dialog from Javascript.

How to develop a Bigcommerce app that would add a javascript tag to all pages in the store?

I would like to develop an app for Bigcommerce that other users of the platform could use. The app should add a simple javascript embed code to all pages of the store. The embed code is similar in nature to google analytics embed or chat services embed codes.
I have opened up a trial account with Bigcommerce and found out that it is very easy to manually edit the page templates to add such an embed code, but I would like to be able to develop an app that store owners could install and not have to mess with editing and copy-pasting embed codes into their page templates.
Unfortunately there is no mechanism currently for BigCommerce that allows for the editing of template code via the app.
I can give you pointers as to where you can put your code to make it globally available.
If you need something in the <head> globally: /Panels/HTMLHead.html
If you need something at the beginning, right after the <body>: /Panel/DrawerMenu.html
If you need something at the end, right before the </body>: /Panels/Footer.html
These are the 3 common places most javascript things (like tracking pixels and analytics) usually go.
Other "extensions" for BigCommerce, such as OLark and Zendesk and Analytics, all just give either a web page with instructions, or a PDF with installation instructions. You could provide your functionality via the same means in lieu of an app doing it.
I haven't really worked with Bigcommerce, but I went thorough their docs and it looks like there is no option for custom module that you can upload and use on their server. And that makes perfect sense.
So I would say the only "forth to try" option is to build browser extension, that does the job for you. As I understood, you can control html output of your store by choosing "Themes" tab > "Edit HTML/CSS", so extension should be able to walk through the three of pages in the left panel.
Chrome Extension
Firefox extension

How can I hide my App tag on a post I created on facebook

I've created a facebook app from which anyone can post to his wall or his friend's wall. But at that post at the bottom the post it displays the app hyperlink. But want to remove it so that it should look like the user create it himself and not by my app.
Is there any way to do so. I use faecbook graph api with Javascript sdk.
Please help me out.
First: Posting to the wall of a friend is highly spammy and should be avoided as much as possible. With the PHP SDK it´s not even possible anymore afaik, or will be removed very soon because it is deprecated. The only way is to use the FB.ui feed dialog of the JavaScript SDK:
https://developers.facebook.com/docs/reference/dialogs/feed/
That being said, there is no way to remove the App Link. Postings made through an App always have to be easily identifiable. It may be possible that posting via the PHP SDK does not show the App Link, but as i said: that function is deprecated for spam reasons and should not be used anymore.

Categories

Resources