esvit / angular-social Goto Github PK
View Code? Open in Web Editor NEWSocial like-buttons with counters for sites (even ajax sites)
License: BSD 3-Clause "New" or "Revised" License
Social like-buttons with counters for sites (even ajax sites)
License: BSD 3-Clause "New" or "Revised" License
returns nginx 500 Internal Server Error.
Thanks for your work in integrating social with angular. Sweet idea :-)
I've social text details that change based upon a when an item is selected from a list:
<ul ng-social-buttons data-url="'http://somedomain.com/path'"
data-title="'{{current_title}}'"
data-description="'{{current_description}}'">
<li class="ng-social-facebook">Facebook</li>
<li class="ng-social-twitter">Twitter</li>
</ul>
The challenge is the literal values {{current_title}} are getting pushed to facebook, twitter, etc instead of $scope.current_title value of the controller.
Thoughts?
Hi. It would be nice to have the possibility to share via E-Mail. I made a directive for it, which I could "merge" into your module if you want.
Regards,
Volker
I'm not sure why, but $http.jsonp in 00-directive.js
isn't working for the Facebook URL set in https://github.com/esvit/angular-social/blob/master/src/scripts/02-facebook.js#L6. For all others (or so it seems), it works fine. I even tried to change that URL to something else, but anything from Facebook doesn't work. Looking into the Network tab, we're not even trying to hit their servers. If I put something random like www.blahblah.com, it works (i.e. we call the server).
I'm using the example in the code to test.
@esvit Have you seen this? Any ideas?
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
Why does the Google+ social share button want to load proxy.php? Why not load the button straight from Google?
Thanks for Angular Social.
We are using the Facebook and Twitter buttons, but without counts. However, our logs show that a call is still being made to get the tweet count.
For this case, it would be a small performance improvement to skip these calls, since the data is not actually used.
I noticed that the URL used counting tweets does not use 'https://', which can be a problem on secure pages.
Further, as noted here, that insecured URL is intended only for internal use by Twitter, and they do not appear to offer version of it that uses https://
https://dev.twitter.com/discussions/5653
Instead, using their Streaming API for counting tweets is recommended. There are options to use 'https://' to access the streaming API.
Adding this library causes the following errors in the console...
http://localhost:3000/proxy.php?url=http%3A%2F%2Flocalhost%3A3000%2Fproduct%2F10&type=google-plus&callback=angular.callbacks._1".
how can i fix it?
Please bump bower version. It is still the old one and bower install doesn't pull the latest commits as of 4 days ago.
The .linear-gradient mixin seems to be broken and causing name errors wherever it is used.
Hi there,
I have a question regarding data-url attribute. Is it possible to pass its value from controller (and how)? I would like to include this on every article, so I wanted to pass something like:
data-url="'article.url'"
I tried also with curly brackets, but with no luck:
data-url="'{{article.url}}'"
Is this possible at all?
Thanks!
Is this depend on angular ~1.0.6
? I seem it works with angular 1.2.12
in my app.
Line 8 in 4ed73eb
"angular": "~1.0.6"
I have the need to share with tumblr ? any plan to support for tumblr ?
Should I be able to pass a different url to each button, like this:
<ul ng-social-buttons
data-title="'Example'"
data-description="task.title"
data-image="task.project.avatar"
data-showcounts="false"
>
<li>Share:</li>
<li data-url="http://example.com/facebook" class="ng-social-facebook">Facebook</li>
<li data-url="http://example.com/google" class="ng-social-google-plus">Google+</li>
<li data-url="http://example.com/twitter" class="ng-social-twitter">Twitter</li>
<li data-url="http://example.com/linkedin" class="ng-social-linkedin">LinkedIn</li>
</ul>
It doesn't seem to work. Am I doing something wrong?
As there are no tags, if I want add "angular-social": "0.1.0"
in my bower.json
, I get:
$ bower install
bower angular-social#0.1.0 not-cached git://github.com/esvit/angular-social.git#0.1.0
bower angular-social#0.1.0 resolve git://github.com/esvit/angular-social.git#0.1.0
bower angular-social#0.1.0 ENORESTARGET No tag found that was able to satisfy 0.1.0
Additional error details:
No versions found in git://github.com/esvit/angular-social.git
Please, create some tags so we (the users) could get specific versions of your library from bower.
Hi,
I have a problem retrieving google+ counter.
I see that I should replace proxy
but I'm not sure with what, and I can't see that in example.
Right now, when retrieving count number, my app targets some non-existing route (localhost/proxy.php....).
Thanks!
Is it possible to use this module using bower like bower --save angular-social?
This would be useful for many users of the directive, as we usually don't want to add every social network which angular-social supports. The way the *.js are organized already allow me to do that (I can get just twitter and facebook, for example), but not the *.less.
As the compiled CSS isn't small (22 KB), it's quite important IMHO.
What do you think?
There's a problem with the actual implementation of each embedded directive (twitter, facebook, etc). The actual implementation doesn't allow me to set values coming from an ajax request into url, description and title attributes. To clarify the problem, assume I have this HTML fragment:
<ul ng-social-buttons
data-description="description"
data-title="title"
data-url="url"
data-image="imageUrl">
<li>Share:</li>
<li class="ng-social-twitter" data-title="twitterText" data-url="twitterUrl">Twitter</li>
Now, consider the code below is somewhere inside the controller for the HTML fragment provided above:
Service.load(someId, function(data) {
$scope.twitterTitle = data.title;
$scope.twitterDescription = data.description;
$scope.twitterUrl = data.url;
});
In that case, Twitter directive (for example) will rely on the values coming from the parent directive instead of using the values from this ajax call. Taking a look at the code, I figured out what the problem is. For example, somewhere in 02-facebook.js and inside the link function, we have:
options.urlOptions = {
url: $parse(attrs.url)(scope)
};
scope.options = options;
scope.ctrl = ctrl;
ctrl.init(scope, element, options);
But when the link function is called, my ajax call is still being processed and these values aren't available yet. To overcome this problem, you should use the scope two way binding feature for each attribute and use scope.watchGroup to wait until the values are set in these variables.
I'm gonna create a pull request with this implementation and send it to you soon.
After installing the latest version of the package, the .bower.json file looks like this:
{
"name": "angular-social",
"version": "0.1.1",
"main": "angular-social.js",
"ignore": [],
"dependencies": {
"angular": "~1.0.6"
},
"homepage": "https://github.com/esvit/angular-social",
"_release": "0.1.1",
"_resolution": {
"type": "version",
"tag": "v0.1.1",
"commit": "dc637f476760b01db64fa4ae349f008b40ef82b7"
},
"_source": "git://github.com/esvit/angular-social.git",
"_target": "*",
"_originalSource": "angular-social"
}
It has a dependency on a older version of angularjs.
Hi,
how can i add hashtags to twitter url? is it have any attribute like "data-hashtags"?
have a nice day,
m.
The Google Plus counter URL is set to: "'//share.yandex.ru/gpp.xml?url={url}'".
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.