|
1 | 1 | /*
|
2 | 2 | * angular-socialshare
|
3 |
| - * 2.3.9 |
| 3 | + * 2.3.10 |
4 | 4 | *
|
5 | 5 | * A social media url and content share module for angularjs.
|
6 | 6 | * http://720kb.github.io/angular-socialshare
|
|
372 | 372 | var urlString;
|
373 | 373 |
|
374 | 374 | if (attrs.socialshareType && attrs.socialshareType === 'feed') {
|
375 |
| - // if user specifies that they want to use the Facebook feed dialog (https://developers.facebook.com/docs/sharing/reference/feed-dialog/v2.4) |
| 375 | + // if user specifies that they want to use the Facebook feed dialog |
| 376 | + //(https://developers.facebook.com/docs/sharing/reference/feed-dialog/v2.4) |
376 | 377 | urlString = 'https://www.facebook.com/dialog/feed?';
|
377 | 378 |
|
378 | 379 | if (attrs.socialshareVia) {
|
|
412 | 413 | + ',top=' + ($window.innerHeight - attrs.socialsharePopupHeight) / 2 + ',left=' + ($window.innerWidth - attrs.socialsharePopupWidth) / 2);
|
413 | 414 |
|
414 | 415 | } else if (attrs.socialshareType && attrs.socialshareType === 'share') {
|
415 |
| - // if user specifies that they want to use the Facebook feed dialog (https://developers.facebook.com/docs/sharing/reference/feed-dialog/v2.4) |
| 416 | + // if user specifies that they want to use the Facebook share dialog |
| 417 | + //(https://developers.facebook.com/docs/sharing/reference/share-dialog) |
416 | 418 | urlString = 'https://www.facebook.com/dialog/share?';
|
417 | 419 |
|
418 | 420 | if (attrs.socialshareVia) {
|
419 | 421 | urlString += '&app_id=' + encodeURIComponent(attrs.socialshareVia);
|
420 | 422 | }
|
421 |
| - if (attrs.socialshareTitle) { |
422 |
| - urlString += '&title=' + encodeURIComponent(attrs.socialshareTitle); |
| 423 | + |
| 424 | + if (attrs.socialshareRedirectUri) { |
| 425 | + urlString += '&redirect_uri=' + encodeURIComponent(attrs.socialshareRedirectUri); |
423 | 426 | }
|
424 | 427 |
|
425 | 428 | if (attrs.socialshareUrl) {
|
|
438 | 441 | urlString += '&mobile_iframe=' + encodeURIComponent(attrs.socialshareMobileiframe);
|
439 | 442 | }
|
440 | 443 |
|
441 |
| - if (attrs.socialshareDescription) { |
442 |
| - urlString += '&description=' + encodeURIComponent(attrs.socialshareDescription); |
443 |
| - } |
444 |
| - |
445 | 444 | if (attrs.socialshareHashtags) {
|
446 | 445 | urlString += '&hashtag=' + encodeURIComponent(attrs.socialshareHashtags);
|
447 | 446 | }
|
448 | 447 |
|
449 |
| - if (attrs.socialshareCaption) { |
450 |
| - urlString += '&caption=' + encodeURIComponent(attrs.socialshareCaption); |
451 |
| - } |
452 |
| - |
453 |
| - if (attrs.socialshareMedia) { |
454 |
| - urlString += '&picture=' + encodeURIComponent(attrs.socialshareMedia); |
455 |
| - } |
456 | 448 |
|
457 | 449 | $window.open(
|
458 | 450 | urlString,
|
459 | 451 | 'Facebook', 'toolbar=0,status=0,resizable=yes,width=' + attrs.socialsharePopupWidth + ',height=' + attrs.socialsharePopupHeight
|
460 | 452 | + ',top=' + ($window.innerHeight - attrs.socialsharePopupHeight) / 2 + ',left=' + ($window.innerWidth - attrs.socialsharePopupWidth) / 2);
|
461 | 453 |
|
462 | 454 | } else if (attrs.socialshareType && attrs.socialshareType === 'send') {
|
463 |
| - // if user specifies that they want to use the Facebook send dialog (https://developers.facebook.com/docs/sharing/reference/send-dialog) |
| 455 | + // if user specifies that they want to use the Facebook send dialog |
| 456 | + //(https://developers.facebook.com/docs/sharing/reference/send-dialog) |
464 | 457 | urlString = 'https://www.facebook.com/dialog/send?';
|
465 | 458 |
|
466 | 459 | if (attrs.socialshareVia) {
|
|
483 | 476 | urlString += '&display=' + encodeURIComponent(attrs.socialshareDisplay);
|
484 | 477 | }
|
485 | 478 |
|
486 |
| - if (attrs.socialshareRef) { |
487 |
| - urlString += '&ref=' + encodeURIComponent(attrs.socialshareRef); |
488 |
| - } |
489 |
| - |
490 | 479 | $window.open(
|
491 | 480 | urlString,
|
492 | 481 | 'Facebook', 'toolbar=0,status=0,resizable=yes,width=' + attrs.socialsharePopupWidth + ',height=' + attrs.socialsharePopupHeight
|
|
0 commit comments