Comments (10)
Hi @cloudzon-hitesh ,
Can you make a plunk which demonstrate the issue at http://plnkr.co for me?
from angular-easyfb.
Hi @pc035860 ,
Same is happening to me... hard to work into a plunker due to the amount of data pulled in from third party APIs.
I bring in the module like so:
(function () {
'use strict';
var id = 'app';
var app = angular.module(id, ['ngRoute', 'ezfb']);
app.config(['$routeProvider', '$locationProvider', '$FBProvider', function ($routeProvider, $locationProvider, $FBProvider) {
$locationProvider.hashPrefix('!');
$FBProvider.setInitParams({
appId: '************',
status: false,
xfbml: false
});
}]);
})();
From what I understand, this is all that is necessary to get the default HTML5 social plugins working, like so: <div class="fb-like" data-href="{{ shareUrl }}" data-layout="standard" data-action="recommend" data-show-faces="true" data-share="true" data-width="273"></div>
Anything in particular to look at? It doesn't appear to render the like button when the "page" changes (no real page change, just a location change in angular).
Thanks.
from angular-easyfb.
Hi @Chaddeus ,
Can you take a DOM screenshot in Chrome DevTools for me?
Try to expand them as detail as you can.
Does it render any error message from Facebook? Or just nothing happend?
Which version of angular-easyfb
module are you using?
from angular-easyfb.
Wow, thanks for the quick reply. I'm using version: 0.3.0, build date: 2014-03-02
My code looks like:
<div class="fb-like" data-href="{{ shareUrl }}" data-layout="standard" data-action="recommend" data-show-faces="true" data-share="true" data-width="273" data-colorscheme="light"></div>
On fresh load, it parses like so:
<div class="fb-like fb_iframe_widget" data-href="https://atmybase.com/MilBase/yokota-ab-japan#!/place/4b7ce854f964a520f1a82fe3" data-layout="standard" data-action="recommend" data-show-faces="true" data-share="true" data-width="273" data-colorscheme="light" fb-xfbml-state="rendered" fb-iframe-plugin-query="action=recommend&app_id=474256679336119&color_scheme=light&href=https%3A%2F%2Fatmybase.com%2FMilBase%2Fyokota-ab-japan%23!%2Fplace%2F4b7ce854f964a520f1a82fe3&layout=standard&locale=en_US&sdk=joey&share=true&show_faces=true&width=273"><span style="vertical-align: bottom; width: 273px; height: 47px;"><iframe name="f360bde8e8" width="273px" height="1000px" frameborder="0" allowtransparency="true" scrolling="no" title="fb:like Facebook Social Plugin" src="https://www.facebook.com/plugins/like.php?action=recommend&app_id=474256679336119&channel=https%3A%2F%2Fs-static.ak.facebook.com%2Fconnect%2Fxd_arbiter%2F63KoCqPoniC.js%3Fversion%3D40%23cb%3Dfc1e0a5b4%26domain%3Datmybase.com%26origin%3Dhttps%253A%252F%252Fatmybase.com%252Ff3eb6ab58%26relation%3Dparent.parent&color_scheme=light&href=https%3A%2F%2Fatmybase.com%2FMilBase%2Fyokota-ab-japan%23!%2Fplace%2F4b7ce854f964a520f1a82fe3&layout=standard&locale=en_US&sdk=joey&share=true&show_faces=true&width=273" class="" style="border: none; visibility: visible; width: 273px; height: 47px;"></iframe></span></div>
On "dynamic" load, it parses like so:
<div class="fb-like fb_iframe_widget" data-href="https://atmybase.com/MilBase/yokota-ab-japan#!/place/4b7ce854f964a520f1a82fe3" data-layout="standard" data-action="recommend" data-show-faces="true" data-share="true" data-width="273" data-colorscheme="light" fb-xfbml-state="rendered" fb-iframe-plugin-query="action=recommend&app_id=474256679336119&color_scheme=light&href=https%3A%2F%2Fatmybase.com%2FMilBase%2F%257B%257B%2520shareUrl%2520%257D%257D&layout=standard&locale=en_US&sdk=joey&share=true&show_faces=true&width=273"><span style="vertical-align: bottom; width: 273px; height: 47px;"><iframe name="f65675968" width="273px" height="1000px" frameborder="0" allowtransparency="true" scrolling="no" title="fb:like Facebook Social Plugin" src="https://www.facebook.com/plugins/like.php?action=recommend&app_id=474256679336119&channel=https%3A%2F%2Fs-static.ak.facebook.com%2Fconnect%2Fxd_arbiter%2F63KoCqPoniC.js%3Fversion%3D40%23cb%3Df14b64a%26domain%3Datmybase.com%26origin%3Dhttps%253A%252F%252Fatmybase.com%252Ff3eb6ab58%26relation%3Dparent.parent&color_scheme=light&href=https%3A%2F%2Fatmybase.com%2FMilBase%2F%257B%257B%2520shareUrl%2520%257D%257D&layout=standard&locale=en_US&sdk=joey&share=true&show_faces=true&width=273" class="" style="border: none; visibility: visible; width: 273px; height: 47px;"></iframe></span></div>
Notice the data-href is correct in both cases, but inside the fb-iframe-plugin-query parameter (which must be generated by the FB plugin) the url is simply adding {{ shareUrl }} to my domain url (which is https://atmybase.com)
Is this something you've seen before?
from angular-easyfb.
I'm guessing if it's caused by string interpolation delay, which might not happen on first-time-page-load.
Can you modify your code to
<div class="fb-like"
ng-if="shareUrl"
data-href="{{ shareUrl }}"
data-layout="standard"
data-action="recommend"
data-show-faces="true"
data-share="true"
data-width="273"
data-colorscheme="light"></div>
See if it works or not?
(which just adds an ng-if
on the directive)
from angular-easyfb.
Yup, that was it. Working perfectly now. Thanks for the excellent support. You may want to consider adding that information to the readme.
Superb product by the way, I really appreciate your time and effort to create this.
from angular-easyfb.
Thanks you for the feedback!
I'll try to find a workaround for the interpolation issue (or update the README lol)
from angular-easyfb.
Interpolated support for built-in social plugin directives in v0.3.1
from angular-easyfb.
Demo: http://plnkr.co/edit/gFM1LV?p=preview
from angular-easyfb.
Its working on loading, but when i navigate to another route and come back to this page its coming like this
from angular-easyfb.
Related Issues (20)
- Facebook Comment And Like Track HOT 9
- Page Plugin not loading on iPad Safari iOS 9.2.1 HOT 1
- "Main" field in package.json is wrong HOT 2
- Upload photos from camera source HOT 3
- Won't initialize when `xfbml: false` given
- Unsupported Browser:: Facebook login does not work from chrome on iPhone. HOT 2
- Minified version of 1.4.4 causes injector error HOT 2
- Dynamic set the locale HOT 2
- Get ezfb to work with import HOT 2
- To show all public posts that are present in Page or a person in facebook?? HOT 3
- apk file created by android studio using ionic framework not working HOT 2
- facebook endpoint changed from *.net to *.com HOT 2
- Angular2 Version? HOT 2
- can i make the custom fb like button and call some controller function on click of that button. HOT 1
- doesn't render FB login button after navigating to different page and back HOT 3
- long-lived token
- How to use fb-login-button directive HOT 1
- In Android device error getting the sdk
- Login Button doesn't work HOT 3
- No way to exchange short-term tokens for long-term tokens
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-easyfb.