I tried to generate like button using Facebook developer website. But when I tested the page the button is loaded very slow because JavaScript SDK is downloaded very slow.
Can I use http://restfb.com/ to generate like button and use it into web page?
refer following URL for probably it help you
https://developers.facebook.com/docs/plugins/like-button
Related
How is it possible for a web application/website to have the same identical source code behind every page on the site with no change at all. I was looking at the crypto - fiat currency exchange website: (Remitano.com) and for each page on the site the code is the same. How could this be possible?
The site is most likely a single page application (SPA). This means that it dynamically adds and removes elements with JavaScript. This is why sites made with React, Vue, and Angular don't work without JavaScript enabled.
For example, if you look at the code of a Vue app, you'll see something like <noscript><strong>We're sorry but myvueapp doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript>. The content inside noscript only displays if the user has JS disabled in their browser.
I am new to react. I currently have a landing page that is basically written in plain html, css, ect. However, I have a Sign In button. When I click it, I would like to redirect to a new page which is written in react. Is this possible? Thank you!
It is possible. But not possible in 1 scenario.
Possible scenario's,
Your react app is hosted on server, in this case you can simply do this,
Sign in
Your react app is not hosted on server, but running on local machine using npm start, in this case you can do this,
Sign in
Note:: target="_blank" is completely your wish as it take you to new page and not changing the current page.
Not Possible scenario
You are working on development mode on local machine, and your react app in not running. In this case you cannot redirect to react app as URL you try to visit is not available.
Yes, it is possible. Your new page(react) is like any other web-page such that when it's address would be loaded by the browser, it will run it - like any other web-page.
If you have a simple HTML webpage with a button and you have another HTML webpage with the React application rendered inside something, you just need a HTML anchor with a href to do the navigation:
<a href="/my-react-app">
<button>Click me to navigate to React!</button>
</a>
If your React application is not rendering on the other webpage that is a completely different issue that I would open a new StackOverflow question for.
P.S.: Generally you would create your whole website in React (as a "single page app") and your landing page and every other page would be rendered in the React application. That is much more flexible and a better user experience.
I am using the ionic framework and would like to be able to read from the HTML from the current webpage and then send the selection back to my application.
I have the Theme-able Browser Plugin setup and can use it like any other web browser.
I have tried looking at ways to include my own script with the .executeScript() function but no luck.
I have also tried to read data from custom buttons that I have inserted into the tool/nav bar but that gives me the HTML of my application.
TL;DR: (Basically want access to the DOM of the current webpage and have the user use native selection to read the document.getSelection() and send that text back to my application.)
Any help would be highly appreciated.
After browsing the forums on Ionic I found the solution:
browser.executeScript({code:'window.getSelection().toString();'}).then((selection)=>{
packet.text = selection[0];});
This allows me to get the selection.
I am using this, somewhat outdated, library.
When i log in a webview loads the following url
https://graph.facebook.com/oauth/authorize?client_id=123456789&display=touch&redirect_uri=https://www.facebook.com/connect/login_success.html&type=user_agent&scope=publish_actions,user_friends
I get a working login page, but there is no cancel button. Am I using the wrong address, or is this something the library would be responsible for adding?
Regards,
Jacob
Do not use this library. It is not maintained any more, and wasn't updated since oct. 2011 ... It is broken.
I use the Facebook API in AIR using HTMLLoaders and URLLoaders. All the flow is documented on the facebook developper's pages. But it's not that easy.
i'm trying to create a safari extension and i'm stuck with something.
I have my global.html on my extension and i've been searching the web for like 3hours on how to retrieve the full html code without success.
I tried:
document.getElementsByTagName('html')[0].innerHTML (when i alert i only see the code that i have inside my global.html)
document.documentElement.innerHTML (nothing happens)
etc...
I used safari.application.activeBrowserWindow.activeTab.url to retrieve the url but i cant get the html code.
Any help?
Thank you
You can't get the HTML of a web page from your extension's global page. You have to use an injected script and then, if you want, you can pass the web page's HTML to your global page using safari.self.tab.dispatchMessage. See this chapter in Apple's documentation.