Reactjs Dynamic Meta Tag on url sharing - reactjs

I need to show title, description and image on url share on social network.
I'm using reactJS,
I tried with helmet and helmet-async, It is changing but when share the url It is picking default one.
I also tried with SSR It is taking dynamically (but in this case only hardcoded title of every page will show. In case of get title from api It is not showing)

Related

Positioning content components on a home page pattern

I want to find a way to be able to change my home page sections on my react-native mobile using a back-office/api.
My home page has several different sections: banner, carousel, products, users. And I want to be able to re-order then and change for example the banner.
My first guess is to store the placement in my database, fetch it and parse it to place the elements according what I set as data in my database.
But I wanted to know if someone knows a pattern to do it ?
In your React Native app, use the fetch or axios library to retrieve the placement and content information from your back-office/API.

is there a way to share react page on Facebook and pass an image?

am trying to make my react page shareable on Facebook and Twitter.
I tried everything I could, I have been googling all day, but I cant find the answer.
<FacebookShareButton url={window.location.href} title={exactNews.text ?exactNews.title : ""}>
<FaFacebookF/>
</FacebookShareButton>
any tips?
There is no way to pass an image to the share options anymore, the only way to add an image to a shared URL is by using the og:image tag in the source. Be aware that Facebook ignores JavaScript, so the og:image tag must be in the original source and not dynamically added via JavaScript. Facebook then automatically uses the image specified in the og:image tag.
More information: https://ogp.me/

ReactJs is it possible to update title as dynamic in index.html

I aware that when we sending some of the url through whatsapp there will include the title, icon and description. I have a website that build using reactjs which host www.url.com. I try to update the title and description dynamic as i need to send the url like url/product1 to others.
As i had tried like using react-helmet but it cause the url i send it just remain link without the icon, title and description.
Is there any ways i can pass the value to index.html to update the icon, title and description of it?

How can I redirect the saved URL in NFC tag to another URL which I will control from my react-native app?

Well, here's the scenario... I have developed a react-native app. In a certain page I put the functionality to scan and write a certain URL in the NFC tag. Now if anybody scans that they can get the URL and thus the webpage.
Now I will leave the NFC tag anywhere and I want to redirect that saved URL on the NFC tag to another URL or page and I want to control this functionality from my react-app without even overwriting the NFC tag again. From far I want to redirect that saved URL on NFC tag to another URL if that make sense...what do I need to do?
I have created the website for that URL already. Which of the sides do I need to code, my website side or my react-native app side?

Get description of meta tag from a URL in Angular

I am setting up a simple app to save links of interesting articles. I'd like to be able to retrieve the description of the meta tag from the website of the URL or at least the first headline or text that appears in the page that is accessed when accessing that URL, to display this next to the URL:
This is the app so far:
http://ux.machinas.com/mux-feed/
Is there a way to do this in angular?
I am facing a similar problem. I am getting a cross-browser script error when trying to get page info with $http.get(), ie $http.get('http://www.stackoverflow.com').
I think the best solution is to get the page info on the server, then send to the browser, ie.
$http.get('./api/getPageInfo.php?url=www.myUrl.com/whatever').then....
this thread explains how to get page info in PHP - Get Facebook meta tags with PHP

Resources