djds4rce / angular-socialshare Goto Github PK
View Code? Open in Web Editor NEWsocial share buttons for angularjs
Home Page: http://plnkr.co/edit/Cah9FtwXDrUMQjChdBG2?p=preview
social share buttons for angularjs
Home Page: http://plnkr.co/edit/Cah9FtwXDrUMQjChdBG2?p=preview
Is there a way to define which image to share.
Normally it's may set with og:image - MetaTag. How can I set it with your script?
Hi guys, I would pass dynamic value to url for facebook e twitter share.
I've this code
<a facebook class="facebookShare" data-url='http://mysite.com/videos/{{video.id}}' data-shares='shares'>{{ shares }}</a>
<a twitter data-lang="en" data-count='horizontal' ng-data-url='http:///mysite.com//videos/{{video.id}}' data-via='notsosleepy' data-size="medium" data-text='Testing Twitter Share' ></a>
Into tag a for twitter I'm using ng-data-url instead of data-url, but when I use this into facebook directive there is an error. There is any way to pass dynamic value to url?
I'm receiving the following error either when using facebook share or facebook feed share button in console and share counts are not getting updated.
XMLHttpRequest cannot load https://api.facebook.com/method/links.getStats?urls=http://www.onlinecmr.in…hina-cuts-corn-surplus-estimate-on-higher-demand-lower-imports&format=json. Request header field API_KEY is not allowed by Access-Control-Allow-Headers in preflight response.
I thought it might because of the changeset #72 . Digging further landed up in the SO question at: http://stackoverflow.com/questions/39028734/get-facebook-share-like-comment-count-of-url , http://stackoverflow.com/questions/37491742/getting-facebook-share-like-and-comment-counts-for-a-given-url-with-api-graph-v and noticed the following in directive:
$http.get('https://api.facebook.com/method/links.getStats?urls=' + attr.url + '&format=json', {withCredentials: false}).success(function(res) {
// success callback goes here
})
Here, what and all we've to send using new FQL to get counts? How it can be fixed?
Heya,
On the version downloaded by bower there is still a syntax error on package.json
(mismatched "
)
"version": "1.4.2,
I noticed it is fixed in the source code, but since it's not on the release then bower downloads the wrong one. In my specific case, I'm loading this package via webpack, and it doesn't even allow me to load anything there since package.json
is invalid.
(as a side-note, version should also be 1.4.3)
Cheers
Hi!
First of all, congratulations for this project! Its awesome.
In my Angular JS project, I'm using the tweet button and sometimes It appears duplicated. This is my code (I'm using Jade template engine)
a(twitter
data-lang='es'
data-count='horizontal'
data-url='http://referi.co'
data-via='ReferiApp'
data-size='medium'
data-text='EN VIVO: {{match.team1.name}} {{match.team1_score}}-{{match.team2_score}} {{match.team2.name}}')
Hi! I've been trying to use the angular-socialshare on a Phonegap / Cordova (v. 6.0.0) app on iOS.
When clicking on the button
<a facebook role="button" class="btn btn-fb btn-lg center-block" data-url="https://URL_TO_REST_SERVICE/shareOnFB?token_auth={{getTokenAuth()}}&uid={{getTransactionId()}}&format=html">Share on Facebook</a>
Won't do anything. No errors on console.
Any suggestions?
Google plus button does not render when I open the view. It show only if I refresh the page. Any help?
Hello and thanks for this Directive. I succed to install it via Git (I did not use bower).
Nevertheless each time I want to share on Facebook All is properly working except that the counter of share is not incrementing ? I of course read the IMPORTANT note :
"
For Correct Sharing of links and updating share count you must enable HTML5 Mode True for your application. i.e No # in URL'S .
angular.module('testing').config(function($locationProvider){
$locationProvider.html5Mode(true).hashPrefix('!');
});
"
So if we try the plunkr demo
this is the code I have now for script.js
angular.module('testing',['djds4rce.angular-socialshare'])
.run(function($FB){
$FB.init('386469651480295');
});
angular.module('testing').config(function($locationProvider){
$locationProvider.html5Mode(true).hashPrefix('!');
})
.controller('temp',function($scope){
});
Did I miss something ?
Best Regards
Phoe
Use the Method mentioned here and fix Pinterest Button
As of July 17, the actions and properties are ignored by Facebook. See https://developers.facebook.com/docs/sharing/reference/feed-dialog/v2.0
Hi,
when I click on the Facebook share button the console spits out: "Uncaught ReferenceError: FB is not defined"...
What am I doing wrong?
I am working on a project which has it's own custom icons for social sharing. But most of your code is about pulling iframes. you should add feature for custom icons.
Is there a way to show the Buttons without the data-bubbles?
I don't want share counts on my buttons. How can I remove them?
Hey
thanks for your great plugin. I'ld like to have a callback triggered when the user shares a URL. How can I do that?
Thanks
Hello, guy I have a problem, Why Facebook shared count doesn't work when url has # ?
Can you help me ?
Thank in advance.
Hi, you write in Getting Started on the GitHub Landing Page
<style rel='stylesheet' type='text/css' href="bower_components/angular-socialshare/angular-socialshare.min.css"></style>
but shouldn't it be
<link rel='stylesheet' href="bower_components/angular-socialshare/angular-socialshare.min.css">
?
Would be great we be able to customise or get the share text translated from facebook automatically.
Hello,
I integrated this code everything working fine, but 1 error is showing in console that "Cannot read property 'appendChild' of null " in twitter widgets.js. I am following the same instruction as you mentioned in your documents.
can you please update bower version of package. In bower latest available version is 0.0.7.
Hi,
I'm using AngularJS v1.2.16. I can't enable HTML5 Mode True for my application as $locationProvider
is supported by a later version of angular.
I notice on the plunker example that the number of shares is being displayed:
http://plnkr.co/edit/Cah9FtwXDrUMQjChdBG2?p=preview
The plunker uses v1.2.6, I changed it to v 1.2.16 and it still worked so I assume it will still work.
Can you please confirm the number of shares still work if not the # in url?
Thank you
Can I add Facebook like button to existing share button?
If it's simple, would someone tell me how to implement it?
Thank you.
I have the need to share with tumblr. do you have plan to integrate tumblr share functionality in the very near future ?
if i would like to add tumblr , could u please give me any advices or best practises ?
Is there a way to change the style of the buttons of the different social networks?
Great library. Please add a LICENSE file or an attribution in the README. Thanks!
The Twitter share button doesn't appear when viewed on an iPhone w/ iOS7 in Mobile Chrome, though it does appear in Safari. I tried pulling up the Plunker demo and noticed the same there.
Hi.
I have a page with posts. It draws through ng-repeat.
Can i pass data into item with {{ }} or can i use controller function getSocialLink() that returns URL string ?
My code:
<div ng-repeat="post in loadedPosts">
<h2>{{post.title}}</h2>
<img ng-src={{post.preview_img}} alt="{{post.title}}"/>
<div>
<a facebook class="facebookShare"
data-url='getSocialLink($index)'
data-shares='shares'>{{ shares }}</a>
....
<div linkedin class="linkedinShare"
data-url='{{post.url}}'
data-title='{{post.title}}'
data-summary="{{post.description}}"
data-shares='linkedinshares'>{{linkedinshares}}</div>
</div>
<p class="preview" ng-bind-html="post.preview"></p>
<a href="{{links.getLink(currentRoute())}}/{{post.slug}}" class="read_more pull-left">{{"MORE_BUTTON"|translate}}</a>
</div>
How I can show social like buttons? is your directive support that feature?
Thanks
Hi, I have an error that I cant understand. Here is my log:
TypeError: Cannot read property 'toString' of undefined
at angular-socialshare.js:73
at angular.min.js:80
at angular.min.js:112
at l.$eval (angular.min.js:125)
at l.$digest (angular.min.js:122)
at l.$apply (angular.min.js:126)
at l (angular.min.js:81)
at S (angular.min.js:85)
at XMLHttpRequest.D.onload (angular.min.js:86)
I don't kwon how to resolve that, Is there a problem with angular-socialshare?
Thank you!
Hi,
I got an error on link function of all directive : actually, the controller ctrl is passed but it does not reference the controller "controller" it's an empty shell. So when ctrl.init() is called in the link function i got on all link functions:
TypeError: undefined is not a function
at link (http://localhost:3000/bower_components/angular-social/angular-social.src.js:341:18)
Thanks in advance
Since twitter button is loaded over an iframe , i am not able to change its style .. Is their any option of doing that ?
I want to show the 'Share' label but translated in another language, how can I achieve this?
Dose it support data binding for the attributes ?
Hi,
facebook share with custom image just did't work. do you have any suggestion on how to fix this?
Hi,
I've got a facebook-feed-share button however whenever I click on Cancel or Post on the popup I get the error:
Refused to display 'https://www.facebook.com/common/invalid_request.php' in a frame because it set 'X-Frame-Options' to 'DENY'.
The frame just goes blank and remains on the screen.
Any ideas on how to fix this?
Thanks.
I'm getting this when the call to api.facebook is made:
{"error_code":12,"error_msg":"REST API is deprecated for versions v2.1 and higher (12)","request_args":[{"key":"method","value":"links.getStats"},{"key":"urls","value":"www.mpi-mps.org"},{"key":"format","value":"json"}]}
?????
My code is below.
<a twitter data-lang="en" data-count='horizontal' data-url='{{shareUrl}}' data-size="medium" data-text='Tweet' ></a>
Tweet count data not show.
When I first began the project I had a setup on plunkr and made a dirty little demo and that was also the development workflow.I was not sure any one would ever use this library. 2 years and 150+ stars later it is painful to continuously develop this way due to lack of a local development environment.
Hi,
I'm doing a $http.get call to the backend to retrieve content, and subsequently setting a product title on the page. I want to pass this product.title into
a(twitter='', data-lang='en', data-count='horizontal', data-url='', data-via='', data-size='medium', data-text='{{product.title}}')
It doesn't appear to work.
In addition, the facebook directive doesn't appear to get the url automatically from window.location.href, along when there is '0' shares, I get an error message:
TypeError: Cannot read property 'share_count' of undefined
Hello,
I love your directive, it sounds really good.
However, whenever I try to use share a page on facebook, data-url, data-title ... are being ignored and the directive try to share the root url of the website.
In my page, I use some meta informations, like meta title, description, keywords ... Maybe it's interfering with the directive.
Any idea?
Thanks
Hey
First of all, thanks for such a great plugin. The plugin runs smoothly in chrome, but for some reasons the tweet button is not coming in firefox, the version I am using is 41.0.2. I can see the iframe in the page source, but their's visibility is set to hidden and height/width is set to 0.
The developers community of twitter says that it should work on firefox 36+.
Any ideas, why it isn't working..?
Thanks
Gautam Pahuja
Hi,
I am developing a hybrid application, which needs social sharing. I tried with facebook sharing and it doesn't work. Nothing happens when I tap on share button. However, when I run on browser, I get this error:
'Given URL is not allowed by the Application configuration: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.'
Any suggestions?
since twitter is coming from an iframe , i will not be able change its style , is their any configuration option ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.