WP Facebook Auto Publish - Version 2.1

Version Description

= Facebook Auto Publish 1.0.1 = If you had issues with default image used for auto publishing, you may apply this upgrade.

= Facebook Auto Publish 1.0 = First official launch.

Download this release

Release Info

Developer f1logic
Plugin Icon 128x128 WP Facebook Auto Publish
Version 2.1
Comparing to
See all releases

Code changes from version 2.0.1 to 2.1

Files changed (105) hide show
  1. admin/ajax-backlink.php +37 -3
  2. admin/authorization.php +4 -2
  3. admin/logs.php +1 -1
  4. admin/manage-authorizations.php +210 -0
  5. admin/menu.php +8 -1
  6. admin/metabox.php +7 -1
  7. admin/publish.php +50 -10
  8. admin/settings.php +149 -103
  9. composer.json +5 -0
  10. composer.lock +76 -0
  11. css/style.css +757 -710
  12. facebook-auto-publish.php +3 -3
  13. readme.txt +9 -2
  14. vendor/autoload.php +7 -0
  15. vendor/composer/ClassLoader.php +445 -0
  16. vendor/composer/LICENSE +21 -0
  17. vendor/composer/autoload_classmap.php +9 -0
  18. vendor/composer/autoload_files.php +10 -0
  19. vendor/composer/autoload_namespaces.php +9 -0
  20. vendor/composer/autoload_psr4.php +10 -0
  21. vendor/composer/autoload_real.php +70 -0
  22. vendor/composer/autoload_static.php +35 -0
  23. vendor/composer/installed.json +62 -0
  24. vendor/facebook/graph-sdk/CODE_OF_CONDUCT.md +3 -0
  25. vendor/facebook/graph-sdk/LICENSE +19 -0
  26. vendor/facebook/graph-sdk/composer.json +42 -0
  27. vendor/facebook/graph-sdk/phpcs.xml.dist +7 -0
  28. {api → vendor/facebook/graph-sdk/src}/Facebook/Authentication/AccessToken.php +1 -1
  29. {api → vendor/facebook/graph-sdk/src}/Facebook/Authentication/AccessTokenMetadata.php +1 -1
  30. {api → vendor/facebook/graph-sdk/src}/Facebook/Authentication/OAuth2Client.php +2 -2
  31. {api → vendor/facebook/graph-sdk/src}/Facebook/Exceptions/FacebookAuthenticationException.php +1 -1
  32. {api → vendor/facebook/graph-sdk/src}/Facebook/Exceptions/FacebookAuthorizationException.php +1 -1
  33. {api → vendor/facebook/graph-sdk/src}/Facebook/Exceptions/FacebookClientException.php +1 -1
  34. {api → vendor/facebook/graph-sdk/src}/Facebook/Exceptions/FacebookOtherException.php +1 -1
  35. {api → vendor/facebook/graph-sdk/src}/Facebook/Exceptions/FacebookResponseException.php +3 -1
  36. {api → vendor/facebook/graph-sdk/src}/Facebook/Exceptions/FacebookResumableUploadException.php +1 -1
  37. {api → vendor/facebook/graph-sdk/src}/Facebook/Exceptions/FacebookSDKException.php +1 -1
  38. {api → vendor/facebook/graph-sdk/src}/Facebook/Exceptions/FacebookServerException.php +1 -1
  39. {api → vendor/facebook/graph-sdk/src}/Facebook/Exceptions/FacebookThrottleException.php +1 -1
  40. {api → vendor/facebook/graph-sdk/src}/Facebook/Facebook.php +24 -3
  41. {api → vendor/facebook/graph-sdk/src}/Facebook/FacebookApp.php +1 -1
  42. {api → vendor/facebook/graph-sdk/src}/Facebook/FacebookBatchRequest.php +45 -26
  43. {api → vendor/facebook/graph-sdk/src}/Facebook/FacebookBatchResponse.php +1 -1
  44. {api → vendor/facebook/graph-sdk/src}/Facebook/FacebookClient.php +1 -1
  45. {api → vendor/facebook/graph-sdk/src}/Facebook/FacebookRequest.php +2 -2
  46. {api → vendor/facebook/graph-sdk/src}/Facebook/FacebookResponse.php +1 -1
  47. {api → vendor/facebook/graph-sdk/src}/Facebook/FileUpload/FacebookFile.php +1 -1
  48. {api → vendor/facebook/graph-sdk/src}/Facebook/FileUpload/FacebookResumableUploader.php +1 -1
  49. {api → vendor/facebook/graph-sdk/src}/Facebook/FileUpload/FacebookTransferChunk.php +1 -1
  50. {api → vendor/facebook/graph-sdk/src}/Facebook/FileUpload/FacebookVideo.php +1 -1
  51. {api → vendor/facebook/graph-sdk/src}/Facebook/FileUpload/Mimetypes.php +2 -1
  52. {api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/Birthday.php +1 -1
  53. {api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/Collection.php +1 -1
  54. {api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphAchievement.php +1 -2
  55. {api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphAlbum.php +1 -1
  56. {api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphApplication.php +1 -1
  57. {api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphCoverPhoto.php +1 -1
  58. {api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphEdge.php +15 -1
  59. {api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphEvent.php +1 -1
  60. {api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphGroup.php +1 -1
  61. {api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphList.php +1 -1
  62. {api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphLocation.php +1 -1
  63. {api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphNode.php +1 -1
  64. {api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphNodeFactory.php +1 -1
  65. {api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphObject.php +1 -1
  66. {api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphObjectFactory.php +1 -1
  67. {api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphPage.php +23 -1
  68. {api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphPicture.php +1 -1
  69. {api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphSessionInfo.php +1 -1
  70. {api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphUser.php +2 -2
  71. {api → vendor/facebook/graph-sdk/src}/Facebook/Helpers/FacebookCanvasHelper.php +1 -1
  72. {api → vendor/facebook/graph-sdk/src}/Facebook/Helpers/FacebookJavaScriptHelper.php +1 -1
  73. {api → vendor/facebook/graph-sdk/src}/Facebook/Helpers/FacebookPageTabHelper.php +1 -1
  74. {api → vendor/facebook/graph-sdk/src}/Facebook/Helpers/FacebookRedirectLoginHelper.php +13 -4
  75. {api → vendor/facebook/graph-sdk/src}/Facebook/Helpers/FacebookSignedRequestFromInputHelper.php +1 -1
  76. {api → vendor/facebook/graph-sdk/src}/Facebook/Http/GraphRawResponse.php +2 -2
  77. {api → vendor/facebook/graph-sdk/src}/Facebook/Http/RequestBodyInterface.php +1 -1
  78. {api → vendor/facebook/graph-sdk/src}/Facebook/Http/RequestBodyMultipart.php +1 -1
  79. {api → vendor/facebook/graph-sdk/src}/Facebook/Http/RequestBodyUrlEncoded.php +1 -1
  80. {api → vendor/facebook/graph-sdk/src}/Facebook/HttpClients/FacebookCurl.php +1 -1
  81. {api → vendor/facebook/graph-sdk/src}/Facebook/HttpClients/FacebookCurlHttpClient.php +2 -2
  82. {api → vendor/facebook/graph-sdk/src}/Facebook/HttpClients/FacebookGuzzleHttpClient.php +1 -1
  83. {api → vendor/facebook/graph-sdk/src}/Facebook/HttpClients/FacebookHttpClientInterface.php +1 -1
  84. {api → vendor/facebook/graph-sdk/src}/Facebook/HttpClients/FacebookStream.php +1 -1
  85. {api → vendor/facebook/graph-sdk/src}/Facebook/HttpClients/FacebookStreamHttpClient.php +1 -1
  86. {api → vendor/facebook/graph-sdk/src}/Facebook/HttpClients/HttpClientsFactory.php +1 -1
  87. {api → vendor/facebook/graph-sdk/src}/Facebook/HttpClients/certs/DigiCertHighAssuranceEVRootCA.pem +0 -0
  88. {api → vendor/facebook/graph-sdk/src}/Facebook/PersistentData/FacebookMemoryPersistentDataHandler.php +1 -1
  89. {api → vendor/facebook/graph-sdk/src}/Facebook/PersistentData/FacebookSessionPersistentDataHandler.php +1 -1
  90. {api → vendor/facebook/graph-sdk/src}/Facebook/PersistentData/PersistentDataFactory.php +1 -1
  91. {api → vendor/facebook/graph-sdk/src}/Facebook/PersistentData/PersistentDataInterface.php +1 -1
  92. {api → vendor/facebook/graph-sdk/src}/Facebook/PseudoRandomString/McryptPseudoRandomStringGenerator.php +1 -1
  93. {api → vendor/facebook/graph-sdk/src}/Facebook/PseudoRandomString/OpenSslPseudoRandomStringGenerator.php +1 -1
  94. {api → vendor/facebook/graph-sdk/src}/Facebook/PseudoRandomString/PseudoRandomStringGeneratorFactory.php +12 -4
  95. {api → vendor/facebook/graph-sdk/src}/Facebook/PseudoRandomString/PseudoRandomStringGeneratorInterface.php +1 -1
  96. {api → vendor/facebook/graph-sdk/src}/Facebook/PseudoRandomString/PseudoRandomStringGeneratorTrait.php +1 -1
  97. vendor/facebook/graph-sdk/src/Facebook/PseudoRandomString/RandomBytesPseudoRandomStringGenerator.php +59 -0
  98. {api → vendor/facebook/graph-sdk/src}/Facebook/PseudoRandomString/UrandomPseudoRandomStringGenerator.php +1 -1
  99. {api → vendor/facebook/graph-sdk/src}/Facebook/SignedRequest.php +4 -4
  100. {api → vendor/facebook/graph-sdk/src}/Facebook/Url/FacebookUrlDetectionHandler.php +3 -2
  101. {api → vendor/facebook/graph-sdk/src}/Facebook/Url/FacebookUrlManipulator.php +1 -1
  102. {api → vendor/facebook/graph-sdk/src}/Facebook/Url/UrlDetectionInterface.php +1 -1
  103. {api → vendor/facebook/graph-sdk/src}/Facebook/autoload.php +3 -1
  104. {api → vendor/facebook/graph-sdk/src}/Facebook/polyfills.php +1 -1
  105. xyz-functions.php +3 -8
admin/ajax-backlink.php CHANGED
@@ -11,7 +11,6 @@ function xyz_fbap_ajax_backlink_call() {
11
  echo 1;die;
12
  }
13
  if(current_user_can('administrator')){
14
- global $wpdb;
15
  if(isset($_POST)){
16
  if(intval($_POST['enable'])==1){
17
  update_option('xyz_credit_link','fbap');
@@ -35,7 +34,6 @@ function xyz_fbap_selected_pages_auto_update_fn() {
35
  {
36
  echo 1;die;
37
  }
38
- global $wpdb;
39
  if(isset($_POST)){
40
  $pages=stripslashes($_POST['pages']);
41
  $smap_sec_key=$_POST['smap_secretkey'];
@@ -58,7 +56,6 @@ function xyz_fbap_xyzscripts_accinfo_auto_update_fn() {
58
  {
59
  echo 1;die;
60
  }
61
- global $wpdb;
62
  if(isset($_POST)){
63
  $xyzscripts_hash_val=stripslashes($_POST['xyz_user_hash']);
64
  $xyzscripts_user_id=$_POST['xyz_userid'];
@@ -68,4 +65,41 @@ function xyz_fbap_xyzscripts_accinfo_auto_update_fn() {
68
  }
69
  die();
70
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  ?>
11
  echo 1;die;
12
  }
13
  if(current_user_can('administrator')){
 
14
  if(isset($_POST)){
15
  if(intval($_POST['enable'])==1){
16
  update_option('xyz_credit_link','fbap');
34
  {
35
  echo 1;die;
36
  }
 
37
  if(isset($_POST)){
38
  $pages=stripslashes($_POST['pages']);
39
  $smap_sec_key=$_POST['smap_secretkey'];
56
  {
57
  echo 1;die;
58
  }
 
59
  if(isset($_POST)){
60
  $xyzscripts_hash_val=stripslashes($_POST['xyz_user_hash']);
61
  $xyzscripts_user_id=$_POST['xyz_userid'];
65
  }
66
  die();
67
  }
68
+ add_action('wp_ajax_xyz_fbap_del_entries', 'xyz_fbap_del_entries_fn');
69
+ function xyz_fbap_del_entries_fn() {
70
+ global $wpdb;
71
+ if($_POST){
72
+ if (! isset( $_POST['_wpnonce'] )|| ! wp_verify_nonce( $_POST['_wpnonce'],'xyz_fbap_del_entries_nonce' ))
73
+ {
74
+ echo 1;die;
75
+ }
76
+ $auth_id=$_POST['auth_id'];
77
+ $xyz_fbap_xyzscripts_user_id = $_POST['xyzscripts_id'];
78
+ $xyz_fbap_xyzscripts_hash_val= $_POST['xyzscripts_user_hash'];
79
+ $delete_entry_details=array('smap_id'=>$auth_id,
80
+ 'xyzscripts_user_id' =>$xyz_fbap_xyzscripts_user_id,
81
+ );
82
+
83
+ $url=XYZ_SMAP_SOLUTION_AUTH_URL.'authorize/delete-fb-auth.php';
84
+ $content=xyz_fbap_post_to_smap_api($delete_entry_details, $url,$xyz_fbap_xyzscripts_hash_val);
85
+ echo $content;
86
+ $result=json_decode($content);$delete_flag=0;
87
+ if(!empty($result))
88
+ {
89
+ if (isset($result->status))
90
+ $delete_flag =$result->status;
91
+ }
92
+ if ($delete_flag===1)
93
+ {
94
+ if ($auth_id==get_option('xyz_fbap_smapsoln_userid'))
95
+ {
96
+ update_option('xyz_fbap_page_names','');
97
+ update_option('xyz_fbap_af', 1);
98
+ update_option('xyz_fbap_secret_key', '');
99
+ update_option('xyz_fbap_smapsoln_userid', 0);
100
+ }
101
+ }
102
+ }
103
+ die();
104
+ }
105
  ?>
admin/authorization.php CHANGED
@@ -89,7 +89,8 @@ if(isset($_COOKIE['xyz_fbap_session_state']) && isset($_REQUEST['state']) && ($_
89
  // break;
90
  // }while(array_key_exists("next", $pagearray1->paging));
91
  }while(isset($pagearray1->paging->next));
92
-
 
93
  $count=count($data);
94
  $fbap_pages_ids1=get_option('xyz_fbap_pages_ids');
95
  $fbap_pages_ids0=array();$newpgs="";
@@ -97,6 +98,7 @@ if(isset($_COOKIE['xyz_fbap_session_state']) && isset($_REQUEST['state']) && ($_
97
  $fbap_pages_ids0=explode(",",$fbap_pages_ids1);
98
 
99
  $fbap_pages_ids=array();$profile_flg=0;
 
100
  for($i=0;$i<count($fbap_pages_ids0);$i++)
101
  {
102
  if($fbap_pages_ids0[$i]!="-1")
@@ -104,7 +106,7 @@ if(isset($_COOKIE['xyz_fbap_session_state']) && isset($_REQUEST['state']) && ($_
104
  else{
105
  $fbap_pages_ids[$i]=$fbap_pages_ids0[$i];$profile_flg=1;
106
  }
107
- }
108
  for($i=0;$i<$count;$i++)
109
  {
110
  if(in_array($data[$i]->id, $fbap_pages_ids))
89
  // break;
90
  // }while(array_key_exists("next", $pagearray1->paging));
91
  }while(isset($pagearray1->paging->next));
92
+ $count=0;
93
+ if (!empty($data))
94
  $count=count($data);
95
  $fbap_pages_ids1=get_option('xyz_fbap_pages_ids');
96
  $fbap_pages_ids0=array();$newpgs="";
98
  $fbap_pages_ids0=explode(",",$fbap_pages_ids1);
99
 
100
  $fbap_pages_ids=array();$profile_flg=0;
101
+ if (!empty($fbap_pages_ids0)){
102
  for($i=0;$i<count($fbap_pages_ids0);$i++)
103
  {
104
  if($fbap_pages_ids0[$i]!="-1")
106
  else{
107
  $fbap_pages_ids[$i]=$fbap_pages_ids0[$i];$profile_flg=1;
108
  }
109
+ }}
110
  for($i=0;$i<$count;$i++)
111
  {
112
  if(in_array($data[$i]->id, $fbap_pages_ids))
admin/logs.php CHANGED
@@ -71,7 +71,7 @@ if( !defined('ABSPATH') ){ exit();}
71
  <?php echo $publishtime;?>
72
  </td>
73
 
74
- <td style="vertical-align: middle !important;padding: 5px;">
75
  <?php
76
 
77
  if($status=="1"){
71
  <?php echo $publishtime;?>
72
  </td>
73
 
74
+ <td class='xyz_fbap_td_custom' style="vertical-align: middle !important;padding: 5px;">
75
  <?php
76
 
77
  if($status=="1"){
admin/manage-authorizations.php ADDED
@@ -0,0 +1,210 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if( !defined('ABSPATH') ){ exit();}?>
2
+ <style type="text/css">
3
+ .widefat {border: 1px solid #eeeeee!important;
4
+ margin: 0px !important;
5
+ border-bottom: 3px solid #00a0d2 !important;
6
+ margin-bottom:5px;}
7
+
8
+ .widefat th {border:1px solid #ffffff !important; background-color:#00a0d2; color:#ffffff; margin:0px !important; padding-top: 12px;
9
+ padding-bottom: 12px;
10
+ text-align: left;}
11
+
12
+ .widefat td, .widefat th {
13
+ color:#2f2f2f ;
14
+ padding: 12px 5px;
15
+ margin: 0px;
16
+ }
17
+
18
+ .widefat tr{ border: 1px solid #ddd;}
19
+
20
+ .widefat tr:nth-child(even){background-color: #dddddd !important;}
21
+
22
+ .widefat tr:hover {background-color: #cccccc;}
23
+
24
+
25
+ .delete_auth_entry{background-color: #00a0d2;
26
+ border: none;
27
+ padding: 5px 10px;
28
+ color: #fff;
29
+ border-radius: 2px;
30
+ outline:0;
31
+ }
32
+
33
+ .delete_auth_entry:hover{background-color:#008282;}
34
+
35
+ .select_box{display: block;
36
+ color:#2f2f2f ;
37
+ padding: 10px;
38
+ background-color: #ddd;
39
+ width: 96.8%;
40
+ margin-bottom: 1px;}
41
+
42
+ </style>
43
+ <script type="text/javascript">
44
+ jQuery(document).ready(function() {
45
+ jQuery('#auth_entries_div').show();
46
+ jQuery("#show_all").attr('checked', true);
47
+
48
+ jQuery("#show_all").click(function(){
49
+ jQuery('#fbap_manage_auth_table tr:has(td.diff_domain)').show();
50
+ jQuery('#fbap_manage_auth_table tr:has(td.same_domain)').show();
51
+ });
52
+ jQuery("#show_same_domain").click(function(){
53
+ jQuery('#fbap_manage_auth_table tr:has(td.diff_domain)').hide();
54
+ jQuery('#fbap_manage_auth_table tr:has(td.same_domain)').show();
55
+ });
56
+ jQuery("#show_diff_domain").click(function(){
57
+ jQuery('#fbap_manage_auth_table tr:has(td.diff_domain)').show();
58
+ jQuery('#fbap_manage_auth_table tr:has(td.same_domain)').hide();
59
+ });
60
+
61
+ jQuery(".delete_auth_entry").off('click').on('click', function() {
62
+ var auth_id=jQuery(this).attr("data-id");
63
+ jQuery("#show-del-icon_"+auth_id).hide();
64
+ jQuery("#ajax-save_"+auth_id).show();
65
+ var xyzscripts_user_hash=jQuery(this).attr("data-xyzscripts_hash");
66
+ var xyzscripts_id=jQuery(this).attr("data-xyzscriptsid");
67
+
68
+ var xyz_fbap_del_entries_nonce= '<?php echo wp_create_nonce('xyz_fbap_del_entries_nonce');?>';
69
+ var dataString = {
70
+ action: 'xyz_fbap_del_entries',
71
+ auth_id: auth_id ,
72
+ xyzscripts_id: xyzscripts_id,
73
+ xyzscripts_user_hash: xyzscripts_user_hash,
74
+ dataType: 'json',
75
+ _wpnonce: xyz_fbap_del_entries_nonce
76
+ };
77
+ jQuery.post(ajaxurl, dataString ,function(data) {
78
+ jQuery("#ajax-save_"+auth_id).hide();
79
+ if(data==1)
80
+ alert("You do not have sufficient permissions");
81
+ else{
82
+
83
+ var data=jQuery.parseJSON(data);
84
+ if(data.status==1){
85
+ jQuery(".tr_"+auth_id).remove();
86
+
87
+ if(jQuery('#system_notice_area').length==0)
88
+ jQuery('body').append('<div class="system_notice_area_style1" id="system_notice_area"></div>');
89
+ jQuery("#system_notice_area").html('Account details successfully deleted from SMAPSolutions&nbsp;&nbsp;&nbsp; <span id="system_notice_area_dismiss">Dismiss</span>');
90
+ jQuery("#system_notice_area").show();
91
+ jQuery('#system_notice_area_dismiss').click(function() {
92
+ jQuery('#system_notice_area').animate({
93
+ opacity : 'hide',
94
+ height : 'hide'
95
+ }, 500);
96
+ });
97
+
98
+ }
99
+ else if(data.status==0 )
100
+ {
101
+ jQuery("#show_err_"+auth_id).append(data.msg);
102
+ }
103
+ }
104
+
105
+
106
+ });
107
+ });
108
+
109
+ });
110
+ </script>
111
+ <h3>Manage Authorizations</h3>
112
+
113
+ <?php
114
+ if( !defined('ABSPATH') ){ exit();}
115
+ global $wpdb;
116
+ $free_plugin_source='fbap';
117
+ $domain_name=trim(get_option('siteurl'));
118
+ $xyzscripts_hash_val=trim(get_option('xyz_fbap_xyzscripts_hash_val'));
119
+ $xyzscripts_user_id=trim(get_option('xyz_fbap_xyzscripts_user_id'));
120
+ $manage_auth_parameters=array(
121
+ 'xyzscripts_user_id'=>$xyzscripts_user_id,
122
+ 'free_plugin_source'=>$free_plugin_source,
123
+ );
124
+ $url=XYZ_SMAP_SOLUTION_AUTH_URL.'authorize/manage-authorizations.php';
125
+ $content=xyz_fbap_post_to_smap_api($manage_auth_parameters,$url,$xyzscripts_hash_val);
126
+ $result=json_decode($content,true);
127
+ if(!empty($result) && isset($result['status']))
128
+ {
129
+ if($result['status']==0)
130
+ {
131
+ $er_msg=$result['msg'];
132
+ echo "<div>".$er_msg."</div>";
133
+ }
134
+ else if($result['status']==1){
135
+ $auth_entries=$result['msg'];
136
+
137
+ ?>
138
+ <div id="auth_entries_div" style="margin-bottom: 5px;">
139
+ <span class="select_box">
140
+ <input type="radio" name="domain_selection" value="0" id="show_all">Show all entries
141
+ <input type="radio" name="domain_selection" value="1" id="show_same_domain">Show entries from current wp installation
142
+ <input type="radio" name="domain_selection" value="2" id="show_diff_domain">Show entries from other wp installations
143
+ </span>
144
+ <table cellpadding="0" cellspacing="0" class="widefat" style="width: 99%; margin: 0 auto; border-bottom:none;" id="fbap_manage_auth_table">
145
+ <thead>
146
+ <tr class="xyz_smap_manage_auth_th">
147
+
148
+ <th scope="col" width="8%">Facebook username</th>
149
+ <th scope="col" width="10%">Selected pages</th>
150
+ <th scope="col" width="10%">Selected groups</th>
151
+ <th scope="col" width="10%">WP url</th>
152
+ <th scope="col" width="10%">Plugin</th>
153
+ <th scope="col" width="5%">Account ID (SMAP PREMIUM)</th>
154
+ <th scope="col" width="5%">Action</th>
155
+ </tr>
156
+ </thead> <?php
157
+
158
+ foreach ($auth_entries as $auth_entries_key => $auth_entries_val)
159
+ {
160
+ ?>
161
+ <tr class="tr_<?php echo $auth_entries_val['auth_id'];?>">
162
+
163
+ <td><?php echo $auth_entries_val['fb_username'];?>
164
+ </td>
165
+ <?php if(isset($auth_entries_val['pages'])&& !empty($auth_entries_val['pages'])){?>
166
+ <td> <?php echo $auth_entries_val['pages'];?> </td>
167
+ <?php }else echo "<td> NA </td>";?>
168
+ <?php if(isset($auth_entries_val['groups'])&& !empty($auth_entries_val['groups'])){?>
169
+ <td> <?php echo $auth_entries_val['groups'];?> </td>
170
+ <?php }else echo "<td> NA </td>";?>
171
+ <?php if($auth_entries_val['domain_name']==$domain_name){?>
172
+ <td class='same_domain'> <?php echo $auth_entries_val['domain_name'];?> </td>
173
+ <?php }
174
+ else{?>
175
+ <td class='diff_domain'> <?php echo $auth_entries_val['domain_name'];?> </td>
176
+ <?php } ?>
177
+ <td> <?php
178
+ if($auth_entries_val['free_plugin_source']=='fbap')
179
+ echo 'WP FACEBOOK AUTO PUBLISH';
180
+ elseif ($auth_entries_val['free_plugin_source']=='smap')
181
+ echo 'SOCIAL MEDIA AUTO PUBLISH';
182
+ else echo 'XYZ-SMAP';
183
+ ?></td>
184
+ <td> <?php if($auth_entries_val['smap_pre_account_id']!=0)echo $auth_entries_val['smap_pre_account_id'];
185
+ else echo 'Not Applicable';?> </td>
186
+ <td>
187
+ <?php if ($domain_name==$auth_entries_val['domain_name'] && $free_plugin_source==$auth_entries_val['free_plugin_source'] ) {
188
+ // $md5_encrypt=md5('smapsolutions'.$xyzscripts_user_id.$xyzscripts_hash_val.$auth_entries_val['auth_id']);
189
+ ?>
190
+ <span id='ajax-save_<?php echo $auth_entries_val['auth_id'];?>' style="display:none;"><img title="Deleting entry" src="<?php echo plugins_url("images/ajax-loader.gif",XYZ_FBAP_PLUGIN_FILE);?>" style="width:20px;height:20px; "></span>
191
+ <span id='show-del-icon_<?php echo $auth_entries_val['auth_id'];?>'>
192
+ <input type="button" class="delete_auth_entry" data-id=<?php echo $auth_entries_val['auth_id'];?> data-xyzscriptsid="<?php echo $xyzscripts_user_id;?>" data-xyzscripts_hash="<?php echo $xyzscripts_hash_val;?>" name='del_entry' value="Delete" >
193
+ </span>
194
+ <span id='show_err_<?php echo $auth_entries_val['auth_id'];?>' style="color:red;" ></span>
195
+ <?php //data-encrypt="<?php echo $md5_encrypt;
196
+ ?></td>
197
+ </tr>
198
+ <?php
199
+ }
200
+
201
+
202
+ }///////////////foreach
203
+ ?></table></div><?php
204
+
205
+ }
206
+ }
207
+ else {
208
+ echo "<div>Unable to connect. Please check your curl and firewall settings</div>";
209
+ }
210
+ ?>
admin/menu.php CHANGED
@@ -21,6 +21,8 @@ function xyz_fbap_menu()
21
  {
22
  add_menu_page('Facebook Auto Publish - Manage settings', 'WP Facebook Auto Publish', 'manage_options', 'facebook-auto-publish-settings', 'xyz_fbap_settings',plugin_dir_url( XYZ_FBAP_PLUGIN_FILE ) . 'images/fbap.png');
23
  add_submenu_page('facebook-auto-publish-settings', 'Facebook Auto Publish - Manage settings', ' Settings', 'manage_options', 'facebook-auto-publish-settings' ,'xyz_fbap_settings'); // 8 for admin
 
 
24
  add_submenu_page('facebook-auto-publish-settings', 'Facebook Auto Publish - Logs', 'Logs', 'manage_options', 'facebook-auto-publish-log' ,'xyz_fbap_logs');
25
  add_submenu_page('facebook-auto-publish-settings', 'Facebook Auto Publish - About', 'About', 'manage_options', 'facebook-auto-publish-about' ,'xyz_fbap_about'); // 8 for admin
26
  add_submenu_page('facebook-auto-publish-settings', 'Facebook Auto Publish - Suggest Feature', 'Suggest a Feature', 'manage_options', 'facebook-auto-publish-suggest-feature' ,'xyz_fbap_suggest_feature');
@@ -66,7 +68,12 @@ function xyz_fbap_suggest_feature()
66
  require( dirname( __FILE__ ) . '/fbap-suggest-feature.php' );
67
  require( dirname( __FILE__ ) . '/footer.php' );
68
  }
69
-
 
 
 
 
 
70
  add_action('wp_head', 'xyz_fbap_insert_og_image_for_fb');
71
  function xyz_fbap_insert_og_image_for_fb(){
72
 
21
  {
22
  add_menu_page('Facebook Auto Publish - Manage settings', 'WP Facebook Auto Publish', 'manage_options', 'facebook-auto-publish-settings', 'xyz_fbap_settings',plugin_dir_url( XYZ_FBAP_PLUGIN_FILE ) . 'images/fbap.png');
23
  add_submenu_page('facebook-auto-publish-settings', 'Facebook Auto Publish - Manage settings', ' Settings', 'manage_options', 'facebook-auto-publish-settings' ,'xyz_fbap_settings'); // 8 for admin
24
+ if(get_option('xyz_fbap_xyzscripts_hash_val')!=''&& get_option('xyz_fbap_xyzscripts_user_id')!='')
25
+ add_submenu_page('facebook-auto-publish-settings', 'Facebook Auto Publish - Manage Authorizations', 'Manage Authorizations', 'manage_options', 'facebook-auto-publish-manage-authorizations' ,'xyz_fbap_manage_authorizations');
26
  add_submenu_page('facebook-auto-publish-settings', 'Facebook Auto Publish - Logs', 'Logs', 'manage_options', 'facebook-auto-publish-log' ,'xyz_fbap_logs');
27
  add_submenu_page('facebook-auto-publish-settings', 'Facebook Auto Publish - About', 'About', 'manage_options', 'facebook-auto-publish-about' ,'xyz_fbap_about'); // 8 for admin
28
  add_submenu_page('facebook-auto-publish-settings', 'Facebook Auto Publish - Suggest Feature', 'Suggest a Feature', 'manage_options', 'facebook-auto-publish-suggest-feature' ,'xyz_fbap_suggest_feature');
68
  require( dirname( __FILE__ ) . '/fbap-suggest-feature.php' );
69
  require( dirname( __FILE__ ) . '/footer.php' );
70
  }
71
+ function xyz_fbap_manage_authorizations()
72
+ {
73
+ require( dirname( __FILE__ ) . '/header.php' );
74
+ require( dirname( __FILE__ ) . '/manage-authorizations.php' );
75
+ require( dirname( __FILE__ ) . '/footer.php' );
76
+ }
77
  add_action('wp_head', 'xyz_fbap_insert_og_image_for_fb');
78
  function xyz_fbap_insert_og_image_for_fb(){
79
 
admin/metabox.php CHANGED
@@ -51,7 +51,13 @@ if(isset($_GET['action']) && $_GET['action']=="edit" && !empty($_GET['post']))
51
 
52
 
53
  if((get_option('xyz_fbap_af')==0 && get_option('xyz_fbap_post_permission')==1 && ((get_option('xyz_fbap_fb_token')!=""&& (get_option('xyz_fbap_app_sel_mode')==0))|| (get_option('xyz_fbap_app_sel_mode')==1 && get_option('xyz_fbap_page_names')!=""))))
54
- add_meta_box( "xyz_fbap", '<strong>WP Facebook Auto Publish </strong>', 'xyz_fbap_addpostmetatags') ;
 
 
 
 
 
 
55
  }
56
  function xyz_fbap_addpostmetatags()
57
  {
51
 
52
 
53
  if((get_option('xyz_fbap_af')==0 && get_option('xyz_fbap_post_permission')==1 && ((get_option('xyz_fbap_fb_token')!=""&& (get_option('xyz_fbap_app_sel_mode')==0))|| (get_option('xyz_fbap_app_sel_mode')==1 && get_option('xyz_fbap_page_names')!=""))))
54
+ add_meta_box( 'xyz_fbap', '<strong>WP Facebook Auto Publish </strong>', 'xyz_fbap_addpostmetatags',
55
+ null, 'normal', 'high',
56
+ array(
57
+ '__block_editor_compatible_meta_box' => true,
58
+ )
59
+ );
60
+ //add_meta_box( "xyz_fbap", '<strong>WP Facebook Auto Publish </strong>', 'xyz_fbap_addpostmetatags') ;
61
  }
62
  function xyz_fbap_addpostmetatags()
63
  {
admin/publish.php CHANGED
@@ -16,6 +16,9 @@ add_action( 'transition_post_status', 'xyz_link_fbap_future_to_publish', 10, 3
16
 
17
  function xyz_link_fbap_future_to_publish($new_status, $old_status, $post){
18
 
 
 
 
19
  if(!isset($GLOBALS['fbap_dup_publish']))
20
  $GLOBALS['fbap_dup_publish']=array();
21
  $postid =$post->ID;
@@ -245,7 +248,7 @@ function xyz_fbap_link_publish($post_ID) {
245
  $xyz_fbap_app_sel_mode=get_option('xyz_fbap_app_sel_mode');
246
  $fbap_secretkey=get_option('xyz_fbap_secret_key');
247
 
248
- if((($xyz_fbap_app_sel_mode==0 && $useracces_token!="" && $appsecret!="" && $appid!="")|| $xyz_fbap_app_sel_mode==1) && $post_permissin==1)
249
  {
250
  $description_li=xyz_fbap_string_limit($description, 10000);
251
  if ($xyz_fbap_app_sel_mode==1){
@@ -346,6 +349,7 @@ function xyz_fbap_link_publish($post_ID) {
346
  {
347
  $attachment = array('name' => "Timeline Photos"
348
  );
 
349
  try{
350
  $album_create=$fb->post('/'.$page_id.'/albums', $attachment);
351
  $album_node=$album_create->getGraphNode();
@@ -389,6 +393,7 @@ function xyz_fbap_link_publish($post_ID) {
389
  {
390
  $attachment = array('name' => $app_name,
391
  );
 
392
  try{
393
  $album_create=$fb->post('/'.$page_id.'/albums', $attachment);
394
  $album_node=$album_create->getGraphNode();
@@ -426,7 +431,8 @@ function xyz_fbap_link_publish($post_ID) {
426
  try{
427
 
428
  if($xyz_fbap_app_sel_mode==1)
429
- {
 
430
  $fbap_smapsoln_userid=get_option('xyz_fbap_smapsoln_userid');
431
  $xyz_fbap_secret_key=get_option('xyz_fbap_secret_key');
432
  $xyz_fbap_fb_numericid=get_option('xyz_fbap_fb_numericid');
@@ -437,25 +443,59 @@ function xyz_fbap_link_publish($post_ID) {
437
  'xyz_smap_posting_method'=>$posting_method,
438
  'xyz_smap_page_id'=>$page_id,
439
  'xyz_smap_app_name'=>$app_name,
440
- 'xyz_smap_secret_key' =>$xyz_fbap_secret_key,
441
  'xyz_fb_numericid' => $xyz_fbap_fb_numericid,
442
  'xyz_smap_xyzscripts_userid'=>$xyz_fbap_xyzscripts_userid
443
  );
444
- $result_smap_solns=xyz_fbap_post_to_facebook($post_details);
 
445
  $result_smap_solns=json_decode($result_smap_solns);
446
  if(!empty($result_smap_solns))
447
  {
448
  $fb_api_count_returned=$result_smap_solns->fb_api_count;
449
  if($result_smap_solns->status==0)
450
  $fb_publish_status[].="<span style=\"color:red\"> ".$page_id."/".$disp_type."/".$result_smap_solns->msg."</span><br/><span style=\"color:#21759B\">No. of api calls used: ".$fb_api_count_returned."</span><br/>";
451
- elseif ($result_smap_solns->status==1)
452
- $fb_publish_status[].="<span style=\"color:green\"> ".$page_id."/".$disp_type."/".$result_smap_solns->msg."</span><br/><span style=\"color:#21759B\">No. of api calls used: ".$fb_api_count_returned."</span><br/>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
453
  }
454
  }
455
  else
456
  {
457
  $attachment['access_token']=$acces_token;
458
  $result = $fb->post('/'.$page_id.'/'.$disp_type.'/', $attachment);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
459
  }
460
  }
461
  catch(Exception $e)
@@ -467,10 +507,11 @@ function xyz_fbap_link_publish($post_ID) {
467
 
468
 
469
  if(count($fb_publish_status)>0)
470
-
471
  $fb_publish_status_insert=serialize($fb_publish_status);
472
- else
473
- $fb_publish_status_insert=1;
 
 
474
 
475
  $time=time();
476
  $post_fb_options=array(
@@ -506,5 +547,4 @@ function xyz_fbap_link_publish($post_ID) {
506
 
507
  $_POST=$_POST_CPY;
508
  }
509
-
510
  ?>
16
 
17
  function xyz_link_fbap_future_to_publish($new_status, $old_status, $post){
18
 
19
+ if (isset($_GET['_locale']) && empty($_POST))
20
+ return ;
21
+
22
  if(!isset($GLOBALS['fbap_dup_publish']))
23
  $GLOBALS['fbap_dup_publish']=array();
24
  $postid =$post->ID;
248
  $xyz_fbap_app_sel_mode=get_option('xyz_fbap_app_sel_mode');
249
  $fbap_secretkey=get_option('xyz_fbap_secret_key');
250
 
251
+ if((($xyz_fbap_app_sel_mode==0 && $useracces_token!="" && $appsecret!="" && $appid!="")|| $xyz_fbap_app_sel_mode==1) && $post_permissin==1 && $af==0 )
252
  {
253
  $description_li=xyz_fbap_string_limit($description, 10000);
254
  if ($xyz_fbap_app_sel_mode==1){
349
  {
350
  $attachment = array('name' => "Timeline Photos"
351
  );
352
+ $attachment['access_token']=$acces_token;
353
  try{
354
  $album_create=$fb->post('/'.$page_id.'/albums', $attachment);
355
  $album_node=$album_create->getGraphNode();
393
  {
394
  $attachment = array('name' => $app_name,
395
  );
396
+ $attachment['access_token']=$acces_token;
397
  try{
398
  $album_create=$fb->post('/'.$page_id.'/albums', $attachment);
399
  $album_node=$album_create->getGraphNode();
431
  try{
432
 
433
  if($xyz_fbap_app_sel_mode==1)
434
+ {
435
+ $post_id_string="";
436
  $fbap_smapsoln_userid=get_option('xyz_fbap_smapsoln_userid');
437
  $xyz_fbap_secret_key=get_option('xyz_fbap_secret_key');
438
  $xyz_fbap_fb_numericid=get_option('xyz_fbap_fb_numericid');
443
  'xyz_smap_posting_method'=>$posting_method,
444
  'xyz_smap_page_id'=>$page_id,
445
  'xyz_smap_app_name'=>$app_name,
446
+ //'xyz_smap_secret_key' =>$xyz_fbap_secret_key,
447
  'xyz_fb_numericid' => $xyz_fbap_fb_numericid,
448
  'xyz_smap_xyzscripts_userid'=>$xyz_fbap_xyzscripts_userid
449
  );
450
+ $url=XYZ_SMAP_SOLUTION_PUBLISH_URL.'api/facebook.php';
451
+ $result_smap_solns=xyz_fbap_post_to_smap_api($post_details,$url,$xyz_fbap_secret_key);
452
  $result_smap_solns=json_decode($result_smap_solns);
453
  if(!empty($result_smap_solns))
454
  {
455
  $fb_api_count_returned=$result_smap_solns->fb_api_count;
456
  if($result_smap_solns->status==0)
457
  $fb_publish_status[].="<span style=\"color:red\"> ".$page_id."/".$disp_type."/".$result_smap_solns->msg."</span><br/><span style=\"color:#21759B\">No. of api calls used: ".$fb_api_count_returned."</span><br/>";
458
+ elseif ($result_smap_solns->status==1){
459
+
460
+ if (isset($result_smap_solns->postid) && !empty($result_smap_solns->postid)){
461
+
462
+ $fb_postid =$result_smap_solns->postid;
463
+ if (strpos($fb_postid, '_') !== false) {
464
+ $fb_post_id_explode=explode('_', $fb_postid);
465
+ $link_to_fb_post='https://www.facebook.com/'.$fb_post_id_explode[0].'/posts/'.$fb_post_id_explode[1];
466
+ }
467
+ else {
468
+ $link_to_fb_post='https://www.facebook.com/'.$page_id.'/posts/'.$fb_postid;
469
+ }
470
+ $post_id_string="<span style=\"color:#21759B;text-decoration:underline;\"><a target=\"_blank\" href=".$link_to_fb_post.">View Post</a></span>";
471
+ }
472
+
473
+ $fb_publish_status[].="<span style=\"color:green\"> ".$page_id."/".$disp_type."/".$result_smap_solns->msg."</span><br/><span style=\"color:#21759B\">No. of api calls used: ".$fb_api_count_returned."</span><br/>".$post_id_string;
474
+ }
475
+
476
  }
477
  }
478
  else
479
  {
480
  $attachment['access_token']=$acces_token;
481
  $result = $fb->post('/'.$page_id.'/'.$disp_type.'/', $attachment);
482
+ $post_id_string_from_ownApp='';
483
+ if($result!='')
484
+ {
485
+ $graphNode = $result->getGraphNode();
486
+ $fb_postid=$graphNode['id'];
487
+ if (!empty($fb_postid)){
488
+ if (strpos($fb_postid, '_') !== false) {
489
+ $fb_post_id_explode=explode('_', $fb_postid);
490
+ $link_to_fb_post='https://www.facebook.com/'.$fb_post_id_explode[0].'/posts/'.$fb_post_id_explode[1];
491
+ }
492
+ else {
493
+ $link_to_fb_post='https://www.facebook.com/'.$page_id.'/posts/'.$fb_postid;
494
+ }
495
+ $post_id_string_from_ownApp="<span style=\"color:#21759B;text-decoration:underline;\"><a target=\"_blank\" href=".$link_to_fb_post."> View Post</a></span>";
496
+ $fb_publish_status[]="<span style=\"color:green\">Success</span><br/>".$post_id_string_from_ownApp;
497
+ }
498
+ }
499
  }
500
  }
501
  catch(Exception $e)
507
 
508
 
509
  if(count($fb_publish_status)>0)
 
510
  $fb_publish_status_insert=serialize($fb_publish_status);
511
+ else{
512
+ $fb_publish_status[]="<span style=\"color:green\">Success</span><br/>".$post_id_string_from_ownApp;
513
+ $fb_publish_status_insert=serialize($fb_publish_status);
514
+ }
515
 
516
  $time=time();
517
  $post_fb_options=array(
547
 
548
  $_POST=$_POST_CPY;
549
  }
 
550
  ?>
admin/settings.php CHANGED
@@ -50,7 +50,7 @@ if(isset($_POST['fb']))
50
  $fbap_pages_list_ids="";
51
 
52
 
53
- if($ss!="" && count($ss)>0)
54
  {
55
  for($i=0;$i<count($ss);$i++)
56
  {
@@ -65,14 +65,8 @@ if(isset($_POST['fb']))
65
 
66
 
67
  update_option('xyz_fbap_pages_ids',$fbap_pages_list_ids);
68
- // if(isset($_POST['xyz_fbap_secret_key'])&& isset($_POST['xyz_fbap_page_names'])){
69
- // update_option('xyz_fbap_page_names',$_POST['xyz_fbap_page_names']);
70
- // update_option('xyz_fbap_secret_key',$_POST['xyz_fbap_secret_key']);
71
- // update_option('xyz_fbap_af',0);
72
- // }
73
  $applidold=get_option('xyz_fbap_application_id');
74
  $applsecretold=get_option('xyz_fbap_application_secret');
75
- //$app_name_old=get_option('xyz_fbap_application_name');
76
  $posting_method=intval($_POST['xyz_fbap_po_method']);
77
  $posting_permission=intval($_POST['xyz_fbap_post_permission']);
78
  $app_name=sanitize_text_field($_POST['xyz_fbap_application_name']);
@@ -109,7 +103,7 @@ if(isset($_POST['fb']))
109
  else if ($xyz_fbap_app_sel_mode_old != $xyz_fbap_app_sel_mode)
110
  {
111
  update_option('xyz_fbap_af',1);
112
- // update_option('xyz_fbap_fb_token','');
113
  // update_option('xyz_fbap_secret_key','');
114
  update_option('xyz_fbap_page_names','');
115
  }
@@ -194,10 +188,12 @@ function dethide_fbap(id)
194
  </script>
195
 
196
  <div style="width: 100%">
 
 
 
 
 
197
 
198
- <h2>
199
- <img src="<?php echo plugins_url()?>/facebook-auto-publish/images/fbap.png" height="16px"> Facebook Settings
200
- </h2>
201
  <?php
202
  $af=get_option('xyz_fbap_af');
203
  $appid=get_option('xyz_fbap_application_id');
@@ -247,7 +243,7 @@ function dethide_fbap(id)
247
  <?php wp_nonce_field( 'xyz_smap_fb_auth_nonce' );?>
248
  <input type="hidden" value="<?php echo (is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST']; ?>" id="parent_domain">
249
  <input type="submit" class="submit_fbap_new" name="fb_auth"
250
- value="Authorize" onclick="javascript:return fbap_popup_fb_auth('<?php echo urlencode($domain_name);?>','<?php echo $xyz_fbap_smapsoln_userid;?>','<?php echo $xyzscripts_user_id;?>','<?php echo $xyzscripts_hash_val;?>','<?php echo $auth_secret_key;?>');"/><br><br>
251
  </form></span>
252
  <?php }
253
  else if($af==0 )
@@ -258,7 +254,7 @@ function dethide_fbap(id)
258
  <?php wp_nonce_field( 'xyz_smap_fb_auth_nonce' );?>
259
  <input type="hidden" value="<?php echo (is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST']; ?>" id="parent_domain">
260
  <input type="submit" class="submit_fbap_new" name="fb_auth"
261
- value="Reauthorize" title="Reauthorize the account" onclick="javascript:return fbap_popup_fb_auth('<?php echo urlencode($domain_name);?>','<?php echo $xyz_fbap_smapsoln_userid;?>','<?php echo $xyzscripts_user_id;?>','<?php echo $xyzscripts_hash_val;?>','<?php echo $auth_secret_key;?>');"/><br><br>
262
  </form>
263
  <?php }
264
  }
@@ -296,8 +292,18 @@ function dethide_fbap(id)
296
 
297
  <div style="font-weight: bold;padding: 3px;">All fields given below are mandatory</div>
298
  <table class="widefat xyz_fbap_widefat_table" style="width: 99%">
 
 
 
 
 
 
 
 
 
299
  <tr valign="top">
300
  <td width="50%">Application name
 
301
  </td>
302
  <td><input id="xyz_fbap_application_name"
303
  name="xyz_fbap_application_name" type="text"
@@ -325,7 +331,7 @@ function dethide_fbap(id)
325
  <span id='ajax-save-xyzscript_acc' style="display:none;"><img class="img" title="Saving details" src="<?php echo plugins_url('../images/ajax-loader.gif',__FILE__);?>" style="width:65px;height:70px; "></span>
326
  <span id="connect_to_xyzscripts"style="background-color: #1A87B9;color: white; padding: 4px 5px;
327
  text-align: center; text-decoration: none; display: inline-block;border-radius: 4px;">
328
- <a href="javascript:fbap_popup_connect_to_xyzscripts();" style="color:white !important;">Connect your xyzscripts account</a>
329
  </span>
330
  </td>
331
  </tr>
@@ -348,6 +354,34 @@ function dethide_fbap(id)
348
  value="<?php if($ms2=="") {echo $apsecret; }?>" />
349
  </td>
350
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
351
  <tr valign="top">
352
  <td>Message format for posting <img src="<?php echo $heimg?>"
353
  onmouseover="detdisplay_fbap('xyz_fb')" onmouseout="dethide_fbap('xyz_fb')" style="width:13px;height:auto;">
@@ -377,41 +411,6 @@ function dethide_fbap(id)
377
  <textarea id="xyz_fbap_message" name="xyz_fbap_message" style="height:80px !important;" ><?php
378
  echo esc_textarea(get_option('xyz_fbap_message'));?></textarea>
379
  </td></tr>
380
-
381
- <tr valign="top">
382
- <td>Posting method
383
- </td>
384
- <td>
385
- <select id="xyz_fbap_po_method" name="xyz_fbap_po_method">
386
- <option value="3"
387
- <?php if(get_option('xyz_fbap_po_method')==3) echo 'selected';?>>Simple text message</option>
388
-
389
- <optgroup label="Text message with image">
390
- <option value="4"
391
- <?php if(get_option('xyz_fbap_po_method')==4) echo 'selected';?>>Upload image to app album</option>
392
- <option value="5"
393
- <?php if(get_option('xyz_fbap_po_method')==5) echo 'selected';?>>Upload image to timeline album</option>
394
- </optgroup>
395
-
396
- <optgroup label="Text message with attached link">
397
- <option value="1"
398
- <?php if(get_option('xyz_fbap_po_method')==1) echo 'selected';?>>Attach
399
- your blog post</option>
400
- <option value="2"
401
- <?php if(get_option('xyz_fbap_po_method')==2) echo 'selected';?>>
402
- Share a link to your blog post</option>
403
- </optgroup>
404
- </select>
405
- </td>
406
- </tr>
407
- <tr valign="top">
408
- <td>Enable auto publish post to my facebook account
409
- </td>
410
- <td class="switch-field">
411
- <label id="xyz_fbap_post_permission_yes"><input type="radio" name="xyz_fbap_post_permission" value="1" <?php if(get_option('xyz_fbap_post_permission')==1) echo 'checked';?>/>Yes</label>
412
- <label id="xyz_fbap_post_permission_no"><input type="radio" name="xyz_fbap_post_permission" value="0" <?php if(get_option('xyz_fbap_post_permission')==0) echo 'checked';?>/>No</label>
413
- </td>
414
- </tr>
415
  <?php
416
  $xyz_acces_token=get_option('xyz_fbap_fb_token');
417
  if($xyz_acces_token!="" && get_option('xyz_fbap_app_sel_mode')==0){
@@ -436,6 +435,8 @@ function dethide_fbap(id)
436
  // break;
437
  // }while(array_key_exists("next", $pagearray1->paging));
438
  }while(isset($pagearray1->paging->next));
 
 
439
  $count=count($data);
440
  $fbap_pages_ids1=get_option('xyz_fbap_pages_ids');
441
  $fbap_pages_ids0=array();
@@ -443,13 +444,14 @@ function dethide_fbap(id)
443
  $fbap_pages_ids0=explode(",",$fbap_pages_ids1);
444
 
445
  $fbap_pages_ids=array();
 
446
  for($i=0;$i<count($fbap_pages_ids0);$i++)
447
  {
448
  if($fbap_pages_ids0[$i]!="-1")
449
  $fbap_pages_ids[$i]=trim(substr($fbap_pages_ids0[$i],0,strpos($fbap_pages_ids0[$i],"-")));
450
  else
451
  $fbap_pages_ids[$i]=$fbap_pages_ids0[$i];
452
- }
453
 
454
  //$data[$i]->id."-".$data[$i]->access_token
455
  ?>
@@ -506,6 +508,7 @@ function dethide_fbap(id)
506
  </tr>
507
  </table>
508
  </form>
 
509
 
510
  <?php
511
 
@@ -587,29 +590,63 @@ function dethide_fbap(id)
587
  $xyz_fbap_default_selection_edit=get_option('xyz_fbap_default_selection_edit');
588
  // $xyz_fbap_utf_decode_enable=get_option('xyz_fbap_utf_decode_enable');
589
  ?>
590
- <h2>Basic Settings</h2>
591
  <form method="post">
592
  <?php wp_nonce_field( 'xyz_smap_basic_settings_form_nonce' );?>
593
  <table class="widefat xyz_fbap_widefat_table" style="width: 99%">
594
-
595
- <tr valign="top">
596
- <td colspan="1" width="50%">Publish wordpress `pages` to facebook
597
- </td>
598
- <td class="switch-field">
599
- <label id="xyz_fbap_include_pages_yes"><input type="radio" name="xyz_fbap_include_pages" value="1" <?php if($xyz_fbap_include_pages==1) echo 'checked';?>/>Yes</label>
600
- <label id="xyz_fbap_include_pages_no"><input type="radio" name="xyz_fbap_include_pages" value="0" <?php if($xyz_fbap_include_pages==0) echo 'checked';?>/>No</label>
601
- </td>
602
- </tr>
603
-
604
  <tr valign="top">
605
  <td colspan="1">Publish wordpress `posts` to facebook
606
  </td>
607
- <td class="switch-field">
608
  <label id="xyz_fbap_include_posts_yes"><input type="radio" name="xyz_fbap_include_posts" value="1" <?php if($xyz_fbap_include_posts==1) echo 'checked';?>/>Yes</label>
609
  <label id="xyz_fbap_include_posts_no"><input type="radio" name="xyz_fbap_include_posts" value="0" <?php if($xyz_fbap_include_posts==0) echo 'checked';?>/>No</label>
610
- </td>
611
- </tr>
612
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
613
  <tr valign="top" id="selPostCat">
614
  <td colspan="1">Select post categories for auto publish
615
  </td>
@@ -657,42 +694,8 @@ function dethide_fbap(id)
657
  ?><br /> <br /> </div>
658
  </td>
659
  </tr>
660
-
661
-
662
- <tr valign="top">
663
- <td colspan="1">Select wordpress custom post types for auto publish</td>
664
- <td><?php
665
- $args=array(
666
- 'public' => true,
667
- '_builtin' => false
668
- );
669
- $output = 'names'; // names or objects, note names is the default
670
- $operator = 'and'; // 'and' or 'or'
671
- $post_types=get_post_types($args,$output,$operator);
672
-
673
- $ar1=explode(",",$xyz_fbap_include_customposttypes);
674
- $cnt=count($post_types);
675
- foreach ($post_types as $post_type ) {
676
-
677
- echo '<input type="checkbox" name="post_types[]" value="'.$post_type.'" ';
678
- if(in_array($post_type, $ar1))
679
- {
680
- echo 'checked="checked"/>';
681
- }
682
- else
683
- echo '/>';
684
-
685
- echo $post_type.'<br/>';
686
-
687
- }
688
- if($cnt==0)
689
- echo 'NA';
690
- ?>
691
- </td>
692
- </tr>
693
-
694
  <tr valign="top">
695
- <td scope="row" colspan="1" width="50%">Default selection of auto publish while editing posts/pages/custom post types
696
  </td>
697
  <td class="switch-field">
698
  <label id="xyz_fbap_default_selection_edit_yes"><input type="radio" name="xyz_fbap_default_selection_edit" value="1" <?php if($xyz_fbap_default_selection_edit==1) echo 'checked';?>/>Enabled</label>
@@ -747,7 +750,7 @@ function dethide_fbap(id)
747
  <label id="xyz_fbap_utf_decode_enable_no"><input type="radio" name="xyz_fbap_utf_decode_enable" value="0" <?php //if($xyz_fbap_utf_decode_enable==0) echo 'checked';?>/>No</label>
748
  </td>
749
  </tr> -->
750
-
751
  <tr valign="top">
752
 
753
  <td colspan="1">Enable credit link to author
@@ -778,6 +781,11 @@ function dethide_fbap(id)
778
 
779
  </table>
780
  </form>
 
 
 
 
 
781
  </div>
782
  <?php if (is_array($xyz_fbap_include_categories))
783
  $xyz_fbap_include_categories1=implode(',', $xyz_fbap_include_categories);
@@ -792,6 +800,21 @@ var catval='<?php echo $xyz_fbap_include_categories1; ?>';
792
  var custtypeval='<?php echo esc_html($xyz_fbap_include_customposttypes); ?>';
793
  var get_opt_cats='<?php echo esc_html(get_option('xyz_fbap_include_posts'));?>';
794
  jQuery(document).ready(function() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
795
  if(catval=="All")
796
  jQuery("#cat_dropdown_span").hide();
797
  else
@@ -849,7 +872,7 @@ jQuery(document).ready(function() {
849
  }
850
  });
851
  window.addEventListener('message', function(e) {
852
- ProcessChildMessage_2(e.data);
853
  } , false);
854
  });
855
 
@@ -966,7 +989,7 @@ function fbap_popup_connect_to_xyzscripts()
966
  childWindow = window.open(smap_xyzscripts_url, "Connect to xyzscripts", "toolbar=yes,scrollbars=yes,resizable=yes,left=500,width=600,height=600");
967
  return false;
968
  }
969
- function ProcessChildMessage_2(message) {
970
  var messageType = message.slice(0,5);
971
  if(messageType==="error")
972
  {
@@ -997,8 +1020,12 @@ function ProcessChildMessage_2(message) {
997
  jQuery("#connect_to_xyzscripts").hide();
998
  jQuery("#ajax-save-xyzscript_acc").show();
999
  jQuery.post(ajaxurl, dataString ,function(response) {
 
 
 
1000
  var base_url = '<?php echo admin_url('admin.php?page=facebook-auto-publish-settings');?>';//msg -
1001
  window.location.href = base_url+'&msg=4';
 
1002
  });
1003
  }
1004
  else if(obj1.pages && obj1.smapsoln_userid)
@@ -1035,8 +1062,27 @@ function ProcessChildMessage_2(message) {
1035
  jQuery("#auth_message").hide();
1036
  jQuery("#ajax-save").show();
1037
  jQuery.post(ajaxurl, dataString ,function(response) {
 
 
 
1038
  var base_url = '<?php echo admin_url('admin.php?page=facebook-auto-publish-settings');?>';//msg -
1039
  window.location.href = base_url+'&msg=5';
 
1040
  });
1041
  }
1042
- }</script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  $fbap_pages_list_ids="";
51
 
52
 
53
+ if(!empty($ss))//$ss!="" && count($ss)>0
54
  {
55
  for($i=0;$i<count($ss);$i++)
56
  {
65
 
66
 
67
  update_option('xyz_fbap_pages_ids',$fbap_pages_list_ids);
 
 
 
 
 
68
  $applidold=get_option('xyz_fbap_application_id');
69
  $applsecretold=get_option('xyz_fbap_application_secret');
 
70
  $posting_method=intval($_POST['xyz_fbap_po_method']);
71
  $posting_permission=intval($_POST['xyz_fbap_post_permission']);
72
  $app_name=sanitize_text_field($_POST['xyz_fbap_application_name']);
103
  else if ($xyz_fbap_app_sel_mode_old != $xyz_fbap_app_sel_mode)
104
  {
105
  update_option('xyz_fbap_af',1);
106
+ update_option('xyz_fbap_fb_token','');
107
  // update_option('xyz_fbap_secret_key','');
108
  update_option('xyz_fbap_page_names','');
109
  }
188
  </script>
189
 
190
  <div style="width: 100%">
191
+ <div class="xyz_fbap_tab">
192
+ <button class="xyz_fbap_tablinks" onclick="xyz_fbap_open_tab(event, 'xyz_fbap_facebook_settings')" id="xyz_fbap_default_tab_settings">Facebook Settings</button>
193
+ <button class="xyz_fbap_tablinks" onclick="xyz_fbap_open_tab(event, 'xyz_fbap_basic_settings')" id="xyz_fbap_basic_tab_settings">General Settings</button>
194
+ </div>
195
+ <div id="xyz_fbap_facebook_settings" class="xyz_fbap_tabcontent">
196
 
 
 
 
197
  <?php
198
  $af=get_option('xyz_fbap_af');
199
  $appid=get_option('xyz_fbap_application_id');
243
  <?php wp_nonce_field( 'xyz_smap_fb_auth_nonce' );?>
244
  <input type="hidden" value="<?php echo (is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST']; ?>" id="parent_domain">
245
  <input type="submit" class="submit_fbap_new" name="fb_auth"
246
+ value="Authorize" onclick="javascript:return fbap_popup_fb_auth('<?php echo urlencode($domain_name);?>','<?php echo $xyz_fbap_smapsoln_userid;?>','<?php echo $xyzscripts_user_id;?>','<?php echo $xyzscripts_hash_val;?>','<?php echo $auth_secret_key;?>');void(0);"/><br><br>
247
  </form></span>
248
  <?php }
249
  else if($af==0 )
254
  <?php wp_nonce_field( 'xyz_smap_fb_auth_nonce' );?>
255
  <input type="hidden" value="<?php echo (is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST']; ?>" id="parent_domain">
256
  <input type="submit" class="submit_fbap_new" name="fb_auth"
257
+ value="Reauthorize" title="Reauthorize the account" onclick="javascript:return fbap_popup_fb_auth('<?php echo urlencode($domain_name);?>','<?php echo $xyz_fbap_smapsoln_userid;?>','<?php echo $xyzscripts_user_id;?>','<?php echo $xyzscripts_hash_val;?>','<?php echo $auth_secret_key;?>');void(0);"/><br><br>
258
  </form>
259
  <?php }
260
  }
292
 
293
  <div style="font-weight: bold;padding: 3px;">All fields given below are mandatory</div>
294
  <table class="widefat xyz_fbap_widefat_table" style="width: 99%">
295
+ <tr valign="top">
296
+ <td>Enable auto publish post to my facebook account
297
+ </td>
298
+ <td class="switch-field">
299
+ <label id="xyz_fbap_post_permission_yes"><input type="radio" name="xyz_fbap_post_permission" value="1" <?php if(get_option('xyz_fbap_post_permission')==1) echo 'checked';?>/>Yes</label>
300
+ <label id="xyz_fbap_post_permission_no"><input type="radio" name="xyz_fbap_post_permission" value="0" <?php if(get_option('xyz_fbap_post_permission')==0) echo 'checked';?>/>No</label>
301
+ </td>
302
+ </tr>
303
+
304
  <tr valign="top">
305
  <td width="50%">Application name
306
+ <br/><span style="color: #0073aa;">[This is for tracking purpose as well as creating Facebook app album]</span>
307
  </td>
308
  <td><input id="xyz_fbap_application_name"
309
  name="xyz_fbap_application_name" type="text"
331
  <span id='ajax-save-xyzscript_acc' style="display:none;"><img class="img" title="Saving details" src="<?php echo plugins_url('../images/ajax-loader.gif',__FILE__);?>" style="width:65px;height:70px; "></span>
332
  <span id="connect_to_xyzscripts"style="background-color: #1A87B9;color: white; padding: 4px 5px;
333
  text-align: center; text-decoration: none; display: inline-block;border-radius: 4px;">
334
+ <a href="javascript:fbap_popup_connect_to_xyzscripts();void(0);" style="color:white !important;">Connect your xyzscripts account</a>
335
  </span>
336
  </td>
337
  </tr>
354
  value="<?php if($ms2=="") {echo $apsecret; }?>" />
355
  </td>
356
  </tr>
357
+
358
+ <tr valign="top">
359
+ <td>Posting method
360
+ </td>
361
+ <td>
362
+ <select id="xyz_fbap_po_method" name="xyz_fbap_po_method">
363
+ <option value="3"
364
+ <?php if(get_option('xyz_fbap_po_method')==3) echo 'selected';?>>Simple text message</option>
365
+
366
+ <optgroup label="Text message with image">
367
+ <option value="4"
368
+ <?php if(get_option('xyz_fbap_po_method')==4) echo 'selected';?>>Upload image to app album</option>
369
+ <option value="5"
370
+ <?php if(get_option('xyz_fbap_po_method')==5) echo 'selected';?>>Upload image to timeline album</option>
371
+ </optgroup>
372
+
373
+ <optgroup label="Text message with attached link">
374
+ <option value="1"
375
+ <?php if(get_option('xyz_fbap_po_method')==1) echo 'selected';?>>Attach
376
+ your blog post</option>
377
+ <option value="2"
378
+ <?php if(get_option('xyz_fbap_po_method')==2) echo 'selected';?>>
379
+ Share a link to your blog post</option>
380
+ </optgroup>
381
+ </select>
382
+ </td>
383
+ </tr>
384
+
385
  <tr valign="top">
386
  <td>Message format for posting <img src="<?php echo $heimg?>"
387
  onmouseover="detdisplay_fbap('xyz_fb')" onmouseout="dethide_fbap('xyz_fb')" style="width:13px;height:auto;">
411
  <textarea id="xyz_fbap_message" name="xyz_fbap_message" style="height:80px !important;" ><?php
412
  echo esc_textarea(get_option('xyz_fbap_message'));?></textarea>
413
  </td></tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
414
  <?php
415
  $xyz_acces_token=get_option('xyz_fbap_fb_token');
416
  if($xyz_acces_token!="" && get_option('xyz_fbap_app_sel_mode')==0){
435
  // break;
436
  // }while(array_key_exists("next", $pagearray1->paging));
437
  }while(isset($pagearray1->paging->next));
438
+ $count=0;
439
+ if (!empty($data))
440
  $count=count($data);
441
  $fbap_pages_ids1=get_option('xyz_fbap_pages_ids');
442
  $fbap_pages_ids0=array();
444
  $fbap_pages_ids0=explode(",",$fbap_pages_ids1);
445
 
446
  $fbap_pages_ids=array();
447
+ if (!empty($fbap_pages_ids0)){
448
  for($i=0;$i<count($fbap_pages_ids0);$i++)
449
  {
450
  if($fbap_pages_ids0[$i]!="-1")
451
  $fbap_pages_ids[$i]=trim(substr($fbap_pages_ids0[$i],0,strpos($fbap_pages_ids0[$i],"-")));
452
  else
453
  $fbap_pages_ids[$i]=$fbap_pages_ids0[$i];
454
+ }}
455
 
456
  //$data[$i]->id."-".$data[$i]->access_token
457
  ?>
508
  </tr>
509
  </table>
510
  </form>
511
+ </div>
512
 
513
  <?php
514
 
590
  $xyz_fbap_default_selection_edit=get_option('xyz_fbap_default_selection_edit');
591
  // $xyz_fbap_utf_decode_enable=get_option('xyz_fbap_utf_decode_enable');
592
  ?>
593
+ <div id="xyz_fbap_basic_settings" class="xyz_fbap_tabcontent">
594
  <form method="post">
595
  <?php wp_nonce_field( 'xyz_smap_basic_settings_form_nonce' );?>
596
  <table class="widefat xyz_fbap_widefat_table" style="width: 99%">
597
+ <tr><td><h2>Basic Settings</h2></td></tr>
 
 
 
 
 
 
 
 
 
598
  <tr valign="top">
599
  <td colspan="1">Publish wordpress `posts` to facebook
600
  </td>
601
+ <td class="switch-field">
602
  <label id="xyz_fbap_include_posts_yes"><input type="radio" name="xyz_fbap_include_posts" value="1" <?php if($xyz_fbap_include_posts==1) echo 'checked';?>/>Yes</label>
603
  <label id="xyz_fbap_include_posts_no"><input type="radio" name="xyz_fbap_include_posts" value="0" <?php if($xyz_fbap_include_posts==0) echo 'checked';?>/>No</label>
604
+ </td>
605
+ </tr>
606
 
607
+ <tr valign="top">
608
+ <td colspan="1" width="50%">Publish wordpress `pages` to facebook
609
+ </td>
610
+ <td class="switch-field">
611
+ <label id="xyz_fbap_include_pages_yes"><input type="radio" name="xyz_fbap_include_pages" value="1" <?php if($xyz_fbap_include_pages==1) echo 'checked';?>/>Yes</label>
612
+ <label id="xyz_fbap_include_pages_no"><input type="radio" name="xyz_fbap_include_pages" value="0" <?php if($xyz_fbap_include_pages==0) echo 'checked';?>/>No</label>
613
+ </td>
614
+ </tr>
615
+
616
+ <?php
617
+ $xyz_fbap_hide_custompost_settings='';
618
+ $args=array(
619
+ 'public' => true,
620
+ '_builtin' => false
621
+ );
622
+ $output = 'names'; // names or objects, note names is the default
623
+ $operator = 'and'; // 'and' or 'or'
624
+ $post_types=get_post_types($args,$output,$operator);
625
+
626
+ $ar1=explode(",",$xyz_fbap_include_customposttypes);
627
+ $cnt=count($post_types);
628
+ if($cnt==0){
629
+ $xyz_fbap_hide_custompost_settings = 'style="display: none;"';//echo 'NA';
630
+ }
631
+ ?>
632
+ <tr valign="top" <?php echo $xyz_fbap_hide_custompost_settings;?>>
633
+ <td colspan="1">Select wordpress custom post types for auto publish</td>
634
+ <td> <?php foreach ($post_types as $post_type ) {
635
+
636
+ echo '<input type="checkbox" name="post_types[]" value="'.$post_type.'" ';
637
+ if(in_array($post_type, $ar1))
638
+ {
639
+ echo 'checked="checked"/>';
640
+ }
641
+ else
642
+ echo '/>';
643
+
644
+ echo $post_type.'<br/>';
645
+
646
+ }?>
647
+ </td>
648
+ </tr>
649
+ <tr><td><h2>Advanced Settings</h2> </td></tr>
650
  <tr valign="top" id="selPostCat">
651
  <td colspan="1">Select post categories for auto publish
652
  </td>
694
  ?><br /> <br /> </div>
695
  </td>
696
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
697
  <tr valign="top">
698
+ <td scope="row" colspan="1" width="50%">Auto publish on editing posts/pages/custom post types
699
  </td>
700
  <td class="switch-field">
701
  <label id="xyz_fbap_default_selection_edit_yes"><input type="radio" name="xyz_fbap_default_selection_edit" value="1" <?php if($xyz_fbap_default_selection_edit==1) echo 'checked';?>/>Enabled</label>
750
  <label id="xyz_fbap_utf_decode_enable_no"><input type="radio" name="xyz_fbap_utf_decode_enable" value="0" <?php //if($xyz_fbap_utf_decode_enable==0) echo 'checked';?>/>No</label>
751
  </td>
752
  </tr> -->
753
+ <tr><td><h2>Other Settings</h2> </td></tr>
754
  <tr valign="top">
755
 
756
  <td colspan="1">Enable credit link to author
781
 
782
  </table>
783
  </form>
784
+
785
+ </div>
786
+
787
+
788
+
789
  </div>
790
  <?php if (is_array($xyz_fbap_include_categories))
791
  $xyz_fbap_include_categories1=implode(',', $xyz_fbap_include_categories);
800
  var custtypeval='<?php echo esc_html($xyz_fbap_include_customposttypes); ?>';
801
  var get_opt_cats='<?php echo esc_html(get_option('xyz_fbap_include_posts'));?>';
802
  jQuery(document).ready(function() {
803
+
804
+ <?php
805
+ if(isset($_POST['bsettngs']))
806
+
807
+ {?>
808
+ document.getElementById("xyz_fbap_basic_tab_settings").click();
809
+ <?php }
810
+ else {?>
811
+ document.getElementById("xyz_fbap_default_tab_settings").click();
812
+
813
+ <?php }
814
+ ?>
815
+
816
+ // Get the element with id="xyz_fbap_default_tab_settings" and click on it
817
+
818
  if(catval=="All")
819
  jQuery("#cat_dropdown_span").hide();
820
  else
872
  }
873
  });
874
  window.addEventListener('message', function(e) {
875
+ xyz_fbap_ProcessChildMessage_2(e.data);
876
  } , false);
877
  });
878
 
989
  childWindow = window.open(smap_xyzscripts_url, "Connect to xyzscripts", "toolbar=yes,scrollbars=yes,resizable=yes,left=500,width=600,height=600");
990
  return false;
991
  }
992
+ function xyz_fbap_ProcessChildMessage_2(message) {
993
  var messageType = message.slice(0,5);
994
  if(messageType==="error")
995
  {
1020
  jQuery("#connect_to_xyzscripts").hide();
1021
  jQuery("#ajax-save-xyzscript_acc").show();
1022
  jQuery.post(ajaxurl, dataString ,function(response) {
1023
+ if(response==1)
1024
+ alert("You do not have sufficient permissions");
1025
+ else{
1026
  var base_url = '<?php echo admin_url('admin.php?page=facebook-auto-publish-settings');?>';//msg -
1027
  window.location.href = base_url+'&msg=4';
1028
+ }
1029
  });
1030
  }
1031
  else if(obj1.pages && obj1.smapsoln_userid)
1062
  jQuery("#auth_message").hide();
1063
  jQuery("#ajax-save").show();
1064
  jQuery.post(ajaxurl, dataString ,function(response) {
1065
+ if(response==1)
1066
+ alert("You do not have sufficient permissions");
1067
+ else{
1068
  var base_url = '<?php echo admin_url('admin.php?page=facebook-auto-publish-settings');?>';//msg -
1069
  window.location.href = base_url+'&msg=5';
1070
+ }
1071
  });
1072
  }
1073
+ }
1074
+
1075
+ function xyz_fbap_open_tab(evt, xyz_fbap_form_div_id) {
1076
+ var i, xyz_fbap_tabcontent, xyz_fbap_tablinks;
1077
+ tabcontent = document.getElementsByClassName("xyz_fbap_tabcontent");
1078
+ for (i = 0; i < tabcontent.length; i++) {
1079
+ tabcontent[i].style.display = "none";
1080
+ }
1081
+ tablinks = document.getElementsByClassName("xyz_fbap_tablinks");
1082
+ for (i = 0; i < tablinks.length; i++) {
1083
+ tablinks[i].className = tablinks[i].className.replace(" active", "");
1084
+ }
1085
+ document.getElementById(xyz_fbap_form_div_id).style.display = "block";
1086
+ evt.currentTarget.className += " active";
1087
+ }
1088
+ </script>
composer.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ {
2
+ "require": {
3
+ "facebook/graph-sdk": "^5.6"
4
+ }
5
+ }
composer.lock ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_readme": [
3
+ "This file locks the dependencies of your project to a known state",
4
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
+ "This file is @generated automatically"
6
+ ],
7
+ "content-hash": "0719d5c0f2ea9b27280d086fced50c4d",
8
+ "packages": [
9
+ {
10
+ "name": "facebook/graph-sdk",
11
+ "version": "5.6.3",
12
+ "source": {
13
+ "type": "git",
14
+ "url": "https://github.com/facebook/php-graph-sdk.git",
15
+ "reference": "90e92bd1816fe718e55184ab85910dfcf488432c"
16
+ },
17
+ "dist": {
18
+ "type": "zip",
19
+ "url": "https://api.github.com/repos/facebook/php-graph-sdk/zipball/90e92bd1816fe718e55184ab85910dfcf488432c",
20
+ "reference": "90e92bd1816fe718e55184ab85910dfcf488432c",
21
+ "shasum": ""
22
+ },
23
+ "require": {
24
+ "php": "^5.4|^7.0"
25
+ },
26
+ "require-dev": {
27
+ "guzzlehttp/guzzle": "~5.0",
28
+ "mockery/mockery": "~0.8",
29
+ "phpunit/phpunit": "~4.0"
30
+ },
31
+ "suggest": {
32
+ "guzzlehttp/guzzle": "Allows for implementation of the Guzzle HTTP client",
33
+ "paragonie/random_compat": "Provides a better CSPRNG option in PHP 5"
34
+ },
35
+ "type": "library",
36
+ "extra": {
37
+ "branch-alias": {
38
+ "dev-master": "5.x-dev"
39
+ }
40
+ },
41
+ "autoload": {
42
+ "psr-4": {
43
+ "Facebook\\": "src/Facebook/"
44
+ },
45
+ "files": [
46
+ "src/Facebook/polyfills.php"
47
+ ]
48
+ },
49
+ "notification-url": "https://packagist.org/downloads/",
50
+ "license": [
51
+ "Facebook Platform"
52
+ ],
53
+ "authors": [
54
+ {
55
+ "name": "Facebook",
56
+ "homepage": "https://github.com/facebook/php-graph-sdk/contributors"
57
+ }
58
+ ],
59
+ "description": "Facebook SDK for PHP",
60
+ "homepage": "https://github.com/facebook/php-graph-sdk",
61
+ "keywords": [
62
+ "facebook",
63
+ "sdk"
64
+ ],
65
+ "time": "2018-07-03T02:25:00+00:00"
66
+ }
67
+ ],
68
+ "packages-dev": [],
69
+ "aliases": [],
70
+ "minimum-stability": "stable",
71
+ "stability-flags": [],
72
+ "prefer-stable": false,
73
+ "prefer-lowest": false,
74
+ "platform": [],
75
+ "platform-dev": []
76
+ }
css/style.css CHANGED
@@ -1,710 +1,757 @@
1
- #system_notice_area {
2
- position: fixed;
3
- margin-bottom:40px;
4
- left:25%;
5
- width:50%;
6
- height:20px;
7
- border-radius:5px;
8
- -moz-border-radius:5px;
9
- -webkit-border-radius:5px;
10
- font-weight:bold;
11
- display:none;
12
- padding:3px;
13
- color: #000000;
14
- text-align: center;
15
- top: 0px;
16
- z-index: 100000;
17
-
18
- }
19
- .xyz_suggest,.xyz_star,.xyz_donate,.xyz_fbook,.xyz_support,.xyz_twitt,.xyz_gplus,.xyz_linkdin{
20
- height:16px;
21
- background-repeat: no-repeat;
22
- background-size: contain;
23
- padding-left: 20px;
24
- text-decoration: none;
25
-
26
- vertical-align: middle;
27
- display: inline-block;
28
-
29
- }
30
- .xyz_suggest{
31
-
32
- background-image: url('../images/suggest.png');
33
- }
34
-
35
- .xyz_star{
36
- background-image: url('../images/star.png');
37
- }
38
-
39
- .xyz_donate{
40
-
41
- background-image: url('../images/donate.png');
42
- }
43
-
44
- .xyz_support{
45
-
46
- background-image: url('../images/support.png');
47
- }
48
- .xyz_home_fbook {
49
-
50
- background-image: url('../images/facebook.png');
51
- }
52
-
53
-
54
- .xyz_home_twitt {
55
-
56
- background-image: url('../images/twitter.png');
57
- }
58
- .xyz_home_gplus {
59
-
60
- background-image: url('../images/gplus.png');
61
- }
62
- .xyz_home_linkedin {
63
-
64
- background-image: url('../images/linkedin.png');
65
- }
66
- .xyz_fbook{
67
-
68
- background-image: url('../images/facebook.png');
69
- }
70
- .xyz_twitt{
71
-
72
- background-image: url('../images/twitter.png');
73
- }
74
- .xyz_gplus{
75
-
76
- background-image: url('../images/gplus.png');
77
- }
78
-
79
- .xyz_linkdin{
80
-
81
- background-image: url('../images/linkedin.png');
82
- }
83
-
84
-
85
- #facebook-auto-publish .xyz_fbook{
86
- margin-left: 3px;
87
- }
88
-
89
- #facebook-auto-publish .xyz_twitt{
90
- margin-left: 3px;
91
- }
92
-
93
- #facebook-auto-publish .xyz_gplus{
94
- margin-left: 3px;
95
- }
96
-
97
- #facebook-auto-publish .xyz_linkdin{
98
- margin-left: 3px;
99
- }
100
-
101
- #facebook-auto-publish .xyz_support{
102
- margin-left: 3px;margin-right: -3px;
103
- }
104
-
105
- #facebook-auto-publish .plugin-version-author-uri {
106
-
107
- background-color: #F4F4F4;
108
- min-height:16px;
109
- border-radius:5px;
110
- margin-bottom: 10px;
111
- font-weight:bold;
112
- padding: 5px;
113
- color: #111111;
114
-
115
- -webkit-box-shadow: 0 8px 6px -6px black;
116
- -moz-box-shadow: 0 8px 6px -6px black;
117
- box-shadow: 0 8px 6px -6px black;
118
-
119
- }
120
-
121
- #facebook-auto-publish th,#facebook-auto-publish td{
122
- background: #a9e8f5; /* Old browsers */
123
- background: linear-gradient( #ffffff,#a9e8f5 ); /* W3C */
124
- }
125
- #facebook-auto-publish .plugin-version-author-uri a,
126
- #facebook-auto-publish .plugin-version-author-uri a:link,
127
- #facebook-auto-publish .plugin-version-author-uri a:hover,
128
- #facebook-auto-publish .plugin-version-author-uri a:active,
129
- #facebook-auto-publish .plugin-version-author-uri a:visited{
130
- color: #111111;
131
- text-decoration: none;
132
-
133
- }
134
- #facebook-auto-publish .plugin-version-author-uri a:hover{
135
-
136
- color:#cc811a;
137
- }
138
- #facebook-auto-publish .plugin-title{
139
-
140
- background: url('images/xyz_logo.png'),linear-gradient( #ffffff,#a9e8f5 );
141
- background-repeat: no-repeat;
142
- background-position: left bottom;
143
-
144
- }
145
-
146
- .xyz-premium-comparison
147
- {
148
- width: 99%;
149
- padding:0px;
150
- border: 1px solid #CCCCCC;
151
- border-radius:3px;
152
- }
153
- .xyz-premium-comparison td
154
- {
155
- padding: 1px;
156
- border: 1px solid #CCCCCC;
157
- height: 25px;
158
- }
159
-
160
- /* Buy Now - button bounce style*/
161
- img.hoverImages {
162
- margin-bottom:20px;
163
- -webkit-transition: margin 0.2s ease-out;
164
- -moz-transition: margin 0.2s ease-out;
165
- -o-transition: margin 0.2s ease-out;
166
- }
167
- img.hoverImages:hover {
168
- cursor:pointer;
169
- margin-top: 5px;
170
- }
171
-
172
-
173
- #system_notice_area_dismiss{
174
- color: #FFFFFF;
175
- cursor: pointer;
176
- }
177
- .system_notice_area_style1 {
178
- background: #00C348;
179
- border: 1px solid green;
180
- }
181
-
182
- .system_notice_area_style0 {
183
- background: #FA5A6A;
184
- border: 1px solid brown;
185
- }
186
-
187
- .submit_fbap_new{
188
- background:#25A6E1;
189
- background:-moz-linear-gradient(top,#25A6E1 0%,#188BC0 100%);
190
- background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#25A6E1),color-stop(100%,#188BC0));
191
- background:-webkit-linear-gradient(top,#25A6E1 0%,#188BC0 100%);
192
- background:-o-linear-gradient(top,#25A6E1 0%,#188BC0 100%);
193
- background:-ms-linear-gradient(top,#25A6E1 0%,#188BC0 100%);
194
- background:linear-gradient(top,#25A6E1 0%,#188BC0 100%);
195
- filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#25A6E1",endColorstr="#188BC0",GradientType=0);
196
- color:#ffffff !important;
197
- border-radius: 4px !important; border: 1px solid #1A87B9 !important;
198
- font-family:"Helvetica Neue",sans-serif;
199
- font-size:13px;
200
- cursor:pointer;height: 30px;
201
- padding-left: 15px;
202
- padding-right: 15px;
203
- }
204
-
205
- .fbap_informationdiv {
206
- background: none repeat scroll 0 0 #9FDAEE;
207
- border: 1px solid #209BD4;
208
- border-radius: 5px 5px 5px 5px;
209
- box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.1);
210
- float: left;
211
- padding: 10px;
212
- position: absolute;
213
- z-index: 1200;
214
- }
215
- .xyz_feedback{
216
- background: #CEEAF7; /* Old browsers */
217
- border: 1px solid #64cfe8;
218
- border-radius:3px;
219
- width: 98%;
220
- min-height:40px;
221
- height:auto;
222
- padding-left: 10px;
223
- padding-top: 10px;
224
- font-weight: bold;
225
- line-height: 20px;
226
-
227
- }
228
-
229
- .xyz_feedback a{
230
- text-decoration: none
231
- }
232
-
233
- .xyz_subscribe{
234
- background: #bae598; /* Old browsers */
235
- border: 1px solid #4d8a1d;
236
- border-radius:3px;
237
- width: 98%;
238
- line-height:20px;
239
- min-height:45px;
240
- height:auto;
241
- padding-left: 10px;
242
- padding-top: 10px;
243
-
244
- }
245
- .xyz_subscribe td{
246
- padding:0;
247
- }
248
-
249
- .xyz_plugins{
250
- background: #F2F2F2; /* Old browsers */
251
- border: 1px solid #DFDFDF;
252
- border-radius:3px;
253
- width: 98%;
254
- padding-left: 10px;
255
- padding-top:10px;
256
- min-height:50px;
257
- height:auto;
258
- margin-top:13px;
259
- line-height: 20px;
260
-
261
- }
262
- .xyz_fbap_poweredBy{
263
- padding-top: 10px;float:left; text-align: center; width: 100%;
264
- }
265
-
266
- .xyz_fbap_poweredBy a{
267
- text-decoration: none;
268
- }
269
-
270
- .submit_fbap{
271
- background:#25A6E1;
272
- background:-moz-linear-gradient(top,#25A6E1 0%,#188BC0 100%);
273
- background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#25A6E1),color-stop(100%,#188BC0));
274
- background:-webkit-linear-gradient(top,#25A6E1 0%,#188BC0 100%);
275
- background:-o-linear-gradient(top,#25A6E1 0%,#188BC0 100%);
276
- background:-ms-linear-gradient(top,#25A6E1 0%,#188BC0 100%);
277
- background:linear-gradient(top,#25A6E1 0%,#188BC0 100%);
278
- filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#25A6E1",endColorstr="#188BC0",GradientType=0);
279
- color:#ffffff;
280
- font-family:"Helvetica Neue",sans-serif;
281
- font-size:13px;
282
- cursor:pointer;
283
- color:#FFFFFF !important;border-radius:4px !important;
284
- border:1px solid #1A87B9;height: 30px;
285
- padding-left: 15px;
286
- padding-right: 15px;
287
- }
288
- #xyz-wp-fbap-premium {
289
- border: 1px solid #FCC328;
290
- margin-bottom: 20px;
291
- margin-top: 20px;
292
- background-color: #FFF6D6;
293
- padding: 3px;
294
- width: 98%;
295
- border-radius:3px;
296
- float: left;
297
- }
298
- a.xyz_fbap_link:hover{text-decoration:underline;}
299
- .xyz_fbap_link{text-decoration:none;font-weight: bold;margin-left:8px;}
300
-
301
- .xyz_fbap_widefat_table input[type="text"], .xyz_fbap_widefat_table input[type="password"], .xyz_fbap_widefat_table input[type="email"], .xyz_fbap_widefat_table input[type="number"], .xyz_fbap_widefat_table input[type="search"], .xyz_fbap_widefat_table input[type="tel"], .xyz_fbap_widefat_table input[type="url"], .xyz_fbap_widefat_table select {
302
- width: 200px;padding: 5px !important;height: 2.35em !important;
303
- }
304
- .xyz_fbap_widefat_table textarea
305
- {
306
- width: 200px;padding: 5px !important;height: 80px !important;
307
- }
308
-
309
- .xyz_fbap_metalist_table{
310
- width: 100%;
311
- }
312
-
313
- .xyz_fbap_pleft15{
314
- padding-left: 15px;
315
- }
316
-
317
- .xyz_fbap_meta_acclist_table{
318
- width: 100%;border: 1px solid #DFDFDF;border-radius:3px; margin-top: 8px;padding-bottom: 5px;
319
- }
320
- .xyz_fbap_meta_acclist_table_td{
321
- background: linear-gradient(to top, #ECECEC, #F9F9F9) repeat scroll 0 0 #F1F1F1;border-bottom: 1px solid #DFDFDF;height: 25px;
322
- }
323
-
324
- .xyz_fbap_meta_acclist_table select ,.xyz_fbap_meta_acclist_table textarea{
325
- width: 200px;padding: 5px !important;height: 2.35em !important;
326
- }
327
-
328
- a {
329
- text-decoration: none;
330
- }
331
- /*new design start*/
332
- .xyz_fbap_social_media {
333
- background-color: #456a72;
334
- width: 22%;
335
- float: left;
336
- min-height: 130px;
337
- margin: 10px 10px 10px 0px;
338
- padding: 10px;
339
- border: 1px solid #456a72;
340
- border-radius: 3px;
341
- }
342
- .xyz_fbap_sugession {
343
- background-color: #571B35;
344
- width: 20%;
345
- float: left;
346
- min-height: 130px;
347
- margin: 10px 10px 10px 0px;
348
- padding: 10px;
349
- border: 1px solid #731C47;
350
- border-radius: 3px;
351
- font-size: 12px;
352
- color: #ffffff;
353
- }
354
- .xyz_fbap_new_subscribe {
355
- background-color: #c82e53;
356
- width: 27%;
357
- float: left;
358
- min-height: 130px;
359
- margin: 10px 10px 10px 0px;
360
- padding: 10px;
361
- border: 1px solid #BE2963;
362
- border-radius: 3px;
363
- }
364
- .xyz_fbap_inmotion {
365
-
366
- width: 21%;
367
- float: left;
368
- min-height: 130px;
369
- margin: 0px 0px 0px 0px;
370
- }
371
- .xyz_fbap_sugession a {
372
- color: #D7B740;
373
- text-decoration: underline;
374
- }
375
-
376
- .xyz_fbap_sugession a:hover{color:#fafa66; text-decoration:underline;}
377
- .xyz_fbap_sugession p{
378
- display: block;
379
- float: left;
380
- line-height: 20px;
381
- width: 100%;
382
- margin: 0px; width:50%;}
383
-
384
- .xyz_new_star{background-image: url(../images/new_star.png);
385
- width: 80px;
386
- height: 20px;
387
- display: block;
388
- background-repeat: no-repeat;
389
- float: left;
390
- }
391
-
392
- .sbmt_btn{ border: none;
393
- color: #ffffff;
394
- background-color: #4e0013;
395
- padding: 5px 10px;
396
- border-radius: 3px;
397
- cursor: pointer;}
398
-
399
- .xyz_fbap_inmotion a:hover{color:#94dbff; text-decoration:underline;}
400
-
401
- .xyz_fbap_inmotion_label{
402
- height: 169px !important;
403
- display: block;
404
- margin: auto;
405
- width:auto !important;}
406
-
407
- .xyz_fbap_new_subscribe input{font-size:11px;margin: 5px;}
408
-
409
- .xyz_fbap_social_media a{
410
- margin: 0px 13px 5px 0px;
411
- border: 1px solid #ddd;
412
- width: 30px;
413
- height: 30px;
414
- padding-left: 0px;
415
- display: block;
416
- float: left;}
417
-
418
- .xyz_fbap_inner_head{ color: #ffffff;
419
- font-weight: 300;
420
- border-bottom: 1px solid #eee;
421
- margin: 0px 0px 10px;
422
- padding-bottom: 10px;}
423
-
424
- .xyz_fbap_plugin_head{margin: 0px;
425
- font-size: 22px;
426
- font-weight: 300;
427
- padding: 0px 10px 5px;}
428
-
429
- .xyz_fbap_name{border:none !important; width:46% !important;}
430
- .xyz_fbap_email{border:none !important; width:46% !important;}
431
-
432
- .xyz_fbap_our_plugins_new a{
433
- text-decoration: none;
434
- display: block;
435
- background-color: #ddd;
436
- float: left;
437
- width: 23%;
438
- margin: 1px;
439
- padding: 0px 10px 0px 0px;
440
- color: #094969;
441
- outline: 0 !important;
442
- line-height: 27px;
443
- }
444
- .xyz_fbap_our_plugins_new a:hover{text-decoration:underline;}
445
-
446
- .xyz_fbap_our_plugins_new a:active{box-shadow:none !important;}
447
-
448
- .xyz_fbap_our_plugins_new a span{
449
- background-color: #00a0d2;
450
- color: #FFFFFF;
451
- width: 30px;
452
- min-height: 28px;
453
- display: block;
454
- float: left;
455
- text-align: center;
456
- margin-right: 10px;
457
- border-right: 2px solid #fff;}
458
-
459
- .xyz_rate_btn{color: #E77E22 !important;
460
- text-decoration: none !important;
461
- margin-right: 4px !important;
462
- font-weight: bold;
463
- background-color: #fff1d6 !important;
464
- border: 1px solid #E77E22 !important;
465
- box-shadow:none !important;}
466
-
467
- .xyz_backlink_btn{color: #00a016 !important;
468
- text-decoration: none !important;
469
- margin-right: 4px !important;
470
- font-weight: bold;
471
- background-color: #f0fff2 !important;
472
- border: 1px solid #00a016 !important;
473
- box-shadow:none !important;}
474
-
475
- .xyz_share_btn{color: #177ABD !important;
476
- text-decoration: none !important;
477
- margin-right: 4px !important;
478
- font-weight: bold;
479
- border: 1px solid #177ABD !important;
480
- background-color: #edf8ff !important;
481
- box-shadow:none !important;}
482
-
483
- .xyz_donate_btn{color: #C12AA2 !important;
484
- text-decoration: none !important;
485
- margin-right: 4px !important;
486
- font-weight: bold;
487
- border: 1px solid #C12AA2 !important;
488
- background-color: #feeafa !important;
489
- box-shadow:none !important;}
490
-
491
- .xyz_show_btn{color: #F15E77 !important;
492
- text-decoration: none !important;
493
- margin-right: 4px !important;
494
- font-weight: bold;
495
- border: 1px solid #F15E77 !important;
496
- background-color: #ffeddf !important;
497
- box-shadow: none !important;}
498
-
499
- @media screen and (max-width: 1351px) {
500
-
501
- .xyz_fbap_social_media{width:21%;}
502
-
503
- .xyz_fbap_new_subscribe{width:24%;}
504
-
505
- .xyz_fbap_inmotion{width:21%;}
506
-
507
- .xyz_fbap_sugession{width:20%;}
508
-
509
- .xyz_fbap_name{border:none !important; width:45% !important;}
510
-
511
- .xyz_fbap_email{border:none !important; width:45% !important;}
512
-
513
- .xyz_fbap_our_plugins_new a{width:23%;}
514
-
515
- }
516
-
517
- @media screen and (max-width: 1251px) {
518
-
519
- .xyz_fbap_social_media{width:21%;}
520
-
521
- .xyz_fbap_new_subscribe{width:24%;}
522
-
523
- .xyz_fbap_inmotion{width:21%;}
524
-
525
- .xyz_fbap_sugession{width:22%;}
526
-
527
- .xyz_fbap_name{border:none !important; width:45% !important;}
528
-
529
- .xyz_fbap_email{border:none !important; width:45% !important;}
530
-
531
- #xyz_fbap_submit_fbap{line-height:20px;}
532
-
533
-
534
- .xyz_fbap_our_plugins_new a{width:23.6%;}
535
- }
536
-
537
- @media screen and (max-width:1155px)
538
- {
539
- .xyz_fbap_social_media{width:45%;}
540
- .xyz_fbap_new_subscribe{width:45%;}
541
- .xyz_fbap_inmotion{width:45%;}
542
- .xyz_fbap_sugession{width:45%;}
543
- .xyz_fbap_our_plugins_new a{width:31%;}
544
- }
545
-
546
-
547
- @media screen and (max-width: 782px)
548
- {
549
- .xyz_fbap_social_media{width:44%;}
550
-
551
- .xyz_fbap_new_subscribe{width:44%;}
552
-
553
- .xyz_fbap_inmotion{width:44%;}
554
-
555
- .xyz_fbap_sugession{width:44%;}
556
-
557
- .xyz_fbap_our_plugins_new a{width:30%;}
558
-
559
- .xyz_fbap_name{border:none !important; width:46% !important;}
560
-
561
- .xyz_fbap_email{border:none !important; width:46% !important;}
562
- }
563
-
564
-
565
- @media screen and (max-width: 768px)
566
- {
567
- #xyz_fbap_submit_fbap{line-height:20px;}
568
- .xyz_fbap_our_plugins_new a{width:30%; font-size:11px;}
569
- }
570
-
571
-
572
- @media screen and (max-width: 675px)
573
- {
574
- .xyz_fbap_our_plugins_new a{width:45%; font-size:11px;}
575
- .xyz_fbap_name{border:none !important; width:95% !important;}
576
- .xyz_fbap_email {
577
- border: none !important;
578
- width: 95% !important;
579
- }
580
- .xyz_fbap_inmotion_label {
581
- height: 185px;
582
- display: block;
583
- margin: auto;
584
- }
585
- }
586
-
587
-
588
- @media screen and (max-width: 562px)
589
- {
590
- .xyz_fbap_sugession{width:92.5%;}
591
-
592
-
593
- .xyz_fbap_new_subscribe{width:92.5%;}
594
-
595
-
596
- .xyz_fbap_social_media{width:92.5%;}
597
- .xyz_fbap_inmotion{width:92.5%;}
598
- .xyz_fbap_email {
599
- border: none !important;
600
- width: 95% !important;
601
- }
602
- }
603
-
604
-
605
- @media screen and (max-width: 532px){
606
-
607
-
608
- .xyz_fbap_social_media{width:92.5%;}
609
-
610
- .xyz_fbap_new_subscribe{width:92.5%;}
611
-
612
- .xyz_fbap_inmotion{width:92.5%;}
613
-
614
- .xyz_fbap_sugession{width:92.5%;}
615
-
616
- .xyz_fbap_our_plugins_new a{width:92.5%;}
617
-
618
- .xyz_fbap_name{border:none !important; width:95% !important;}
619
-
620
- .xyz_fbap_email{border:none !important; width:95% !important;}
621
- }
622
-
623
-
624
- /*new design end*/
625
- .switch-field input[type=radio] {
626
- position: absolute !important;
627
- clip: rect(0, 0, 0, 0);
628
- height: 1px;
629
- width: 1px;
630
- border: 0;
631
- overflow: hidden;
632
- }
633
-
634
- .switch-field label {
635
- float: left;
636
- }
637
-
638
- .switch-field label {
639
- display: inline-block;
640
- color: rgba(0, 0, 0, 0.6);
641
- width: 50px;
642
- font-weight: normal;
643
- text-align: center;
644
- text-shadow: none;
645
- padding: 6px 14px;
646
- -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.1);
647
- box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.1);
648
- -webkit-transition: all 0.1s ease-in-out;
649
- -moz-transition: all 0.1s ease-in-out;
650
- -ms-transition: all 0.1s ease-in-out;
651
- -o-transition: all 0.1s ease-in-out;
652
- transition: all 0.1s ease-in-out;
653
- }
654
- .switch-field label:hover {
655
- cursor: pointer;
656
- }
657
- .switch-field label:first-of-type {
658
- border-radius: 4px 0 0 4px;min-width: 50px;width:auto;
659
- }
660
- .switch-field label:last-of-type {
661
- border-radius: 0 4px 4px 0;min-width: 50px;width:auto;
662
- }
663
- .scroll_checkbox
664
- {
665
- border: 2px solid #ccc;
666
- width: 200px;
667
- height: 150px;
668
- overflow-y: scroll;
669
- overflow-x: visible;
670
- }
671
- .toplevel_page_facebook-auto-publish-settings img{
672
- width:20px;
673
- height:auto;
674
- }
675
- .xyz_fbap_toggle_off
676
- {
677
- background-color:#dddddd !important;
678
- color:#888888 !important;
679
- font-weight:normal !important;
680
- }
681
- .xyz_fbap_toggle_on
682
- {
683
- background-color:#28A6A2 !important;
684
- color:#1e1b1b !important;
685
- font-weight:bold !important;
686
- }
687
- .xyz-fbap-buy-now{
688
- float: left;
689
- margin-top: 3px;
690
- }
691
- .xyz-fbap-buy-now img{
692
- width:148px !important;
693
- height:38px !important;
694
- }
695
- .xyz-fbap-buy-button {
696
- display:block;
697
- color:white;
698
- padding:5px 21px;
699
- background: #545454;
700
- border: 0;
701
- border-bottom: 2px solid #545454;
702
- cursor: pointer;
703
- -webkit-box-shadow: inset 0 -2px #545454;
704
- box-shadow: inset 0 -2px #545454;
705
- text-decoration: none;
706
- font-size: 14px;
707
- font-weight: bold;
708
- border-radius:3px;
709
- text-align: center;
710
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #system_notice_area {
2
+ position: fixed;
3
+ margin-bottom:40px;
4
+ left:25%;
5
+ width:50%;
6
+ height:20px;
7
+ border-radius:5px;
8
+ -moz-border-radius:5px;
9
+ -webkit-border-radius:5px;
10
+ font-weight:bold;
11
+ display:none;
12
+ padding:3px;
13
+ color: #000000;
14
+ text-align: center;
15
+ top: 0px;
16
+ z-index: 100000;
17
+
18
+ }
19
+ .xyz_suggest,.xyz_star,.xyz_donate,.xyz_fbook,.xyz_support,.xyz_twitt,.xyz_gplus,.xyz_linkdin{
20
+ height:16px;
21
+ background-repeat: no-repeat;
22
+ background-size: contain;
23
+ padding-left: 20px;
24
+ text-decoration: none;
25
+
26
+ vertical-align: middle;
27
+ display: inline-block;
28
+
29
+ }
30
+ .xyz_suggest{
31
+
32
+ background-image: url('../images/suggest.png');
33
+ }
34
+
35
+ .xyz_star{
36
+ background-image: url('../images/star.png');
37
+ }
38
+
39
+ .xyz_donate{
40
+
41
+ background-image: url('../images/donate.png');
42
+ }
43
+
44
+ .xyz_support{
45
+
46
+ background-image: url('../images/support.png');
47
+ }
48
+ .xyz_home_fbook {
49
+
50
+ background-image: url('../images/facebook.png');
51
+ }
52
+
53
+
54
+ .xyz_home_twitt {
55
+
56
+ background-image: url('../images/twitter.png');
57
+ }
58
+ .xyz_home_gplus {
59
+
60
+ background-image: url('../images/gplus.png');
61
+ }
62
+ .xyz_home_linkedin {
63
+
64
+ background-image: url('../images/linkedin.png');
65
+ }
66
+ .xyz_fbook{
67
+
68
+ background-image: url('../images/facebook.png');
69
+ }
70
+ .xyz_twitt{
71
+
72
+ background-image: url('../images/twitter.png');
73
+ }
74
+ .xyz_gplus{
75
+
76
+ background-image: url('../images/gplus.png');
77
+ }
78
+
79
+ .xyz_linkdin{
80
+
81
+ background-image: url('../images/linkedin.png');
82
+ }
83
+
84
+
85
+ #facebook-auto-publish .xyz_fbook{
86
+ margin-left: 3px;
87
+ }
88
+
89
+ #facebook-auto-publish .xyz_twitt{
90
+ margin-left: 3px;
91
+ }
92
+
93
+ #facebook-auto-publish .xyz_gplus{
94
+ margin-left: 3px;
95
+ }
96
+
97
+ #facebook-auto-publish .xyz_linkdin{
98
+ margin-left: 3px;
99
+ }
100
+
101
+ #facebook-auto-publish .xyz_support{
102
+ margin-left: 3px;margin-right: -3px;
103
+ }
104
+
105
+ #facebook-auto-publish .plugin-version-author-uri {
106
+
107
+ background-color: #F4F4F4;
108
+ min-height:16px;
109
+ border-radius:5px;
110
+ margin-bottom: 10px;
111
+ font-weight:bold;
112
+ padding: 5px;
113
+ color: #111111;
114
+
115
+ -webkit-box-shadow: 0 8px 6px -6px black;
116
+ -moz-box-shadow: 0 8px 6px -6px black;
117
+ box-shadow: 0 8px 6px -6px black;
118
+
119
+ }
120
+
121
+ #facebook-auto-publish th,#facebook-auto-publish td{
122
+ background: #a9e8f5; /* Old browsers */
123
+ background: linear-gradient( #ffffff,#a9e8f5 ); /* W3C */
124
+ }
125
+ #facebook-auto-publish .plugin-version-author-uri a,
126
+ #facebook-auto-publish .plugin-version-author-uri a:link,
127
+ #facebook-auto-publish .plugin-version-author-uri a:hover,
128
+ #facebook-auto-publish .plugin-version-author-uri a:active,
129
+ #facebook-auto-publish .plugin-version-author-uri a:visited{
130
+ color: #111111;
131
+ text-decoration: none;
132
+
133
+ }
134
+ #facebook-auto-publish .plugin-version-author-uri a:hover{
135
+
136
+ color:#cc811a;
137
+ }
138
+ #facebook-auto-publish .plugin-title{
139
+
140
+ background: url('images/xyz_logo.png'),linear-gradient( #ffffff,#a9e8f5 );
141
+ background-repeat: no-repeat;
142
+ background-position: left bottom;
143
+
144
+ }
145
+
146
+ .xyz-premium-comparison
147
+ {
148
+ width: 99%;
149
+ padding:0px;
150
+ border: 1px solid #CCCCCC;
151
+ border-radius:3px;
152
+ }
153
+ .xyz-premium-comparison td
154
+ {
155
+ padding: 1px;
156
+ border: 1px solid #CCCCCC;
157
+ height: 25px;
158
+ }
159
+
160
+ /* Buy Now - button bounce style*/
161
+ img.hoverImages {
162
+ margin-bottom:20px;
163
+ -webkit-transition: margin 0.2s ease-out;
164
+ -moz-transition: margin 0.2s ease-out;
165
+ -o-transition: margin 0.2s ease-out;
166
+ }
167
+ img.hoverImages:hover {
168
+ cursor:pointer;
169
+ margin-top: 5px;
170
+ }
171
+
172
+
173
+ #system_notice_area_dismiss{
174
+ color: #FFFFFF;
175
+ cursor: pointer;
176
+ }
177
+ .system_notice_area_style1 {
178
+ background: #00C348;
179
+ border: 1px solid green;
180
+ }
181
+
182
+ .system_notice_area_style0 {
183
+ background: #FA5A6A;
184
+ border: 1px solid brown;
185
+ }
186
+
187
+ .submit_fbap_new{
188
+ background: #698600;
189
+ color: #f7f7f7 !important;
190
+ border-radius: 2px !important;
191
+ border: none;
192
+ font-family: "Helvetica Neue",sans-serif;
193
+ font-size: 13px;
194
+ cursor: pointer;
195
+ padding: 8px 15px;
196
+ font-weight: 500;
197
+ text-transform: uppercase;
198
+ outline: 0;
199
+ }
200
+
201
+ .fbap_informationdiv {
202
+ background: none repeat scroll 0 0 #9FDAEE;
203
+ border: 1px solid #209BD4;
204
+ border-radius: 5px 5px 5px 5px;
205
+ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.1);
206
+ float: left;
207
+ padding: 10px;
208
+ position: absolute;
209
+ z-index: 1200;
210
+ }
211
+ .xyz_feedback{
212
+ background: #CEEAF7; /* Old browsers */
213
+ border: 1px solid #64cfe8;
214
+ border-radius:3px;
215
+ width: 98%;
216
+ min-height:40px;
217
+ height:auto;
218
+ padding-left: 10px;
219
+ padding-top: 10px;
220
+ font-weight: bold;
221
+ line-height: 20px;
222
+
223
+ }
224
+
225
+ .xyz_feedback a{
226
+ text-decoration: none
227
+ }
228
+
229
+ .xyz_subscribe{
230
+ background: #bae598; /* Old browsers */
231
+ border: 1px solid #4d8a1d;
232
+ border-radius:3px;
233
+ width: 98%;
234
+ line-height:20px;
235
+ min-height:45px;
236
+ height:auto;
237
+ padding-left: 10px;
238
+ padding-top: 10px;
239
+
240
+ }
241
+ .xyz_subscribe td{
242
+ padding:0;
243
+ }
244
+
245
+ .xyz_plugins{
246
+ background: #F2F2F2; /* Old browsers */
247
+ border: 1px solid #DFDFDF;
248
+ border-radius:3px;
249
+ width: 98%;
250
+ padding-left: 10px;
251
+ padding-top:10px;
252
+ min-height:50px;
253
+ height:auto;
254
+ margin-top:13px;
255
+ line-height: 20px;
256
+
257
+ }
258
+ .xyz_fbap_poweredBy{
259
+ padding-top: 10px;float:left; text-align: center; width: 100%;
260
+ }
261
+
262
+ .xyz_fbap_poweredBy a{
263
+ text-decoration: none;
264
+ }
265
+
266
+ .submit_fbap{
267
+ background:#25A6E1;
268
+ background:-moz-linear-gradient(top,#25A6E1 0%,#188BC0 100%);
269
+ background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#25A6E1),color-stop(100%,#188BC0));
270
+ background:-webkit-linear-gradient(top,#25A6E1 0%,#188BC0 100%);
271
+ background:-o-linear-gradient(top,#25A6E1 0%,#188BC0 100%);
272
+ background:-ms-linear-gradient(top,#25A6E1 0%,#188BC0 100%);
273
+ background:linear-gradient(top,#25A6E1 0%,#188BC0 100%);
274
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#25A6E1",endColorstr="#188BC0",GradientType=0);
275
+ color:#ffffff;
276
+ font-family:"Helvetica Neue",sans-serif;
277
+ font-size:13px;
278
+ cursor:pointer;
279
+ color:#FFFFFF !important;border-radius:4px !important;
280
+ border:1px solid #1A87B9;height: 30px;
281
+ padding-left: 15px;
282
+ padding-right: 15px;
283
+ }
284
+ #xyz-wp-fbap-premium {
285
+ border: 1px solid #FCC328;
286
+ margin-bottom: 20px;
287
+ margin-top: 20px;
288
+ background-color: #FFF6D6;
289
+ padding: 3px;
290
+ width: 98%;
291
+ border-radius:3px;
292
+ float: left;
293
+ }
294
+ a.xyz_fbap_link:hover{text-decoration:underline;}
295
+ .xyz_fbap_link{text-decoration:none;font-weight: bold;margin-left:8px;}
296
+
297
+ .xyz_fbap_widefat_table input[type="text"], .xyz_fbap_widefat_table input[type="password"], .xyz_fbap_widefat_table input[type="email"], .xyz_fbap_widefat_table input[type="number"], .xyz_fbap_widefat_table input[type="search"], .xyz_fbap_widefat_table input[type="tel"], .xyz_fbap_widefat_table input[type="url"], .xyz_fbap_widefat_table select {
298
+ width: 200px;padding: 5px !important;height: 2.35em !important;
299
+ }
300
+ .xyz_fbap_widefat_table textarea
301
+ {
302
+ width: 200px;padding: 5px !important;height: 80px !important;
303
+ }
304
+
305
+ .xyz_fbap_metalist_table{
306
+ width: 100%;
307
+ }
308
+
309
+ .xyz_fbap_pleft15{
310
+ padding-left: 15px;
311
+ }
312
+
313
+ .xyz_fbap_meta_acclist_table{
314
+ width: 100%;border: 1px solid #DFDFDF;border-radius:3px; margin-top: 8px;padding-bottom: 5px;
315
+ }
316
+ .xyz_fbap_meta_acclist_table_td{
317
+ background: linear-gradient(to top, #ECECEC, #F9F9F9) repeat scroll 0 0 #F1F1F1;border-bottom: 1px solid #DFDFDF;height: 25px;
318
+ }
319
+
320
+ .xyz_fbap_meta_acclist_table select ,.xyz_fbap_meta_acclist_table textarea{
321
+ width: 200px;padding: 5px !important;height: 2.35em !important;
322
+ }
323
+
324
+ a {
325
+ text-decoration: none;
326
+ }
327
+ /*new design start*/
328
+ .xyz_fbap_social_media {
329
+ background-color: #456a72;
330
+ width: 22%;
331
+ float: left;
332
+ min-height: 130px;
333
+ margin: 10px 10px 10px 0px;
334
+ padding: 10px;
335
+ border: 1px solid #456a72;
336
+ border-radius: 3px;
337
+ }
338
+ .xyz_fbap_sugession {
339
+ background-color: #571B35;
340
+ width: 20%;
341
+ float: left;
342
+ min-height: 130px;
343
+ margin: 10px 10px 10px 0px;
344
+ padding: 10px;
345
+ border: 1px solid #731C47;
346
+ border-radius: 3px;
347
+ font-size: 12px;
348
+ color: #ffffff;
349
+ }
350
+ .xyz_fbap_new_subscribe {
351
+ background-color: #c82e53;
352
+ width: 27%;
353
+ float: left;
354
+ min-height: 130px;
355
+ margin: 10px 10px 10px 0px;
356
+ padding: 10px;
357
+ border: 1px solid #BE2963;
358
+ border-radius: 3px;
359
+ }
360
+ .xyz_fbap_inmotion {
361
+
362
+ width: 21%;
363
+ float: left;
364
+ min-height: 130px;
365
+ margin: 0px 0px 0px 0px;
366
+ }
367
+ .xyz_fbap_sugession a {
368
+ color: #D7B740;
369
+ text-decoration: underline;
370
+ }
371
+
372
+ .xyz_fbap_sugession a:hover{color:#fafa66; text-decoration:underline;}
373
+ .xyz_fbap_sugession p{
374
+ display: block;
375
+ float: left;
376
+ line-height: 20px;
377
+ width: 100%;
378
+ margin: 0px; width:50%;}
379
+
380
+ .xyz_new_star{background-image: url(../images/new_star.png);
381
+ width: 80px;
382
+ height: 20px;
383
+ display: block;
384
+ background-repeat: no-repeat;
385
+ float: left;
386
+ }
387
+
388
+ .sbmt_btn{ border: none;
389
+ color: #ffffff;
390
+ background-color: #4e0013;
391
+ padding: 5px 10px;
392
+ border-radius: 3px;
393
+ cursor: pointer;}
394
+
395
+ .xyz_fbap_inmotion a:hover{color:#94dbff; text-decoration:underline;}
396
+
397
+ .xyz_fbap_inmotion_label{
398
+ height: 169px !important;
399
+ display: block;
400
+ margin: auto;
401
+ width:auto !important;}
402
+
403
+ .xyz_fbap_new_subscribe input{font-size:11px;margin: 5px;}
404
+
405
+ .xyz_fbap_social_media a{
406
+ margin: 0px 13px 5px 0px;
407
+ border: 1px solid #ddd;
408
+ width: 30px;
409
+ height: 30px;
410
+ padding-left: 0px;
411
+ display: block;
412
+ float: left;}
413
+
414
+ .xyz_fbap_inner_head{ color: #ffffff;
415
+ font-weight: 300;
416
+ border-bottom: 1px solid #eee;
417
+ margin: 0px 0px 10px;
418
+ padding-bottom: 10px;}
419
+
420
+ .xyz_fbap_plugin_head{margin: 0px;
421
+ font-size: 22px;
422
+ font-weight: 300;
423
+ padding: 0px 10px 5px;}
424
+
425
+ .xyz_fbap_name{border:none !important; width:46% !important;}
426
+ .xyz_fbap_email{border:none !important; width:46% !important;}
427
+
428
+ .xyz_fbap_our_plugins_new a{
429
+ text-decoration: none;
430
+ display: block;
431
+ background-color: #ddd;
432
+ float: left;
433
+ width: 23%;
434
+ margin: 1px;
435
+ padding: 0px 10px 0px 0px;
436
+ color: #094969;
437
+ outline: 0 !important;
438
+ line-height: 27px;
439
+ }
440
+ .xyz_fbap_our_plugins_new a:hover{text-decoration:underline;}
441
+
442
+ .xyz_fbap_our_plugins_new a:active{box-shadow:none !important;}
443
+
444
+ .xyz_fbap_our_plugins_new a span{
445
+ background-color: #00a0d2;
446
+ color: #FFFFFF;
447
+ width: 30px;
448
+ min-height: 28px;
449
+ display: block;
450
+ float: left;
451
+ text-align: center;
452
+ margin-right: 10px;
453
+ border-right: 2px solid #fff;}
454
+
455
+ .xyz_rate_btn{color: #E77E22 !important;
456
+ text-decoration: none !important;
457
+ margin-right: 4px !important;
458
+ font-weight: bold;
459
+ background-color: #fff1d6 !important;
460
+ border: 1px solid #E77E22 !important;
461
+ box-shadow:none !important;}
462
+
463
+ .xyz_backlink_btn{color: #00a016 !important;
464
+ text-decoration: none !important;
465
+ margin-right: 4px !important;
466
+ font-weight: bold;
467
+ background-color: #f0fff2 !important;
468
+ border: 1px solid #00a016 !important;
469
+ box-shadow:none !important;}
470
+
471
+ .xyz_share_btn{color: #177ABD !important;
472
+ text-decoration: none !important;
473
+ margin-right: 4px !important;
474
+ font-weight: bold;
475
+ border: 1px solid #177ABD !important;
476
+ background-color: #edf8ff !important;
477
+ box-shadow:none !important;}
478
+
479
+ .xyz_donate_btn{color: #C12AA2 !important;
480
+ text-decoration: none !important;
481
+ margin-right: 4px !important;
482
+ font-weight: bold;
483
+ border: 1px solid #C12AA2 !important;
484
+ background-color: #feeafa !important;
485
+ box-shadow:none !important;}
486
+
487
+ .xyz_show_btn{color: #F15E77 !important;
488
+ text-decoration: none !important;
489
+ margin-right: 4px !important;
490
+ font-weight: bold;
491
+ border: 1px solid #F15E77 !important;
492
+ background-color: #ffeddf !important;
493
+ box-shadow: none !important;}
494
+
495
+ @media screen and (max-width: 1351px) {
496
+
497
+ .xyz_fbap_social_media{width:21%;}
498
+
499
+ .xyz_fbap_new_subscribe{width:24%;}
500
+
501
+ .xyz_fbap_inmotion{width:21%;}
502
+
503
+ .xyz_fbap_sugession{width:20%;}
504
+
505
+ .xyz_fbap_name{border:none !important; width:45% !important;}
506
+
507
+ .xyz_fbap_email{border:none !important; width:45% !important;}
508
+
509
+ .xyz_fbap_our_plugins_new a{width:23%;}
510
+
511
+ }
512
+
513
+ @media screen and (max-width: 1251px) {
514
+
515
+ .xyz_fbap_social_media{width:21%;}
516
+
517
+ .xyz_fbap_new_subscribe{width:24%;}
518
+
519
+ .xyz_fbap_inmotion{width:21%;}
520
+
521
+ .xyz_fbap_sugession{width:22%;}
522
+
523
+ .xyz_fbap_name{border:none !important; width:45% !important;}
524
+
525
+ .xyz_fbap_email{border:none !important; width:45% !important;}
526
+
527
+ #xyz_fbap_submit_fbap{line-height:20px;}
528
+
529
+
530
+ .xyz_fbap_our_plugins_new a{width:23.6%;}
531
+ }
532
+
533
+ @media screen and (max-width:1155px)
534
+ {
535
+ .xyz_fbap_social_media{width:45%;}
536
+ .xyz_fbap_new_subscribe{width:45%;}
537
+ .xyz_fbap_inmotion{width:45%;}
538
+ .xyz_fbap_sugession{width:45%;}
539
+ .xyz_fbap_our_plugins_new a{width:31%;}
540
+ }
541
+
542
+
543
+ @media screen and (max-width: 782px)
544
+ {
545
+ .xyz_fbap_social_media{width:44%;}
546
+
547
+ .xyz_fbap_new_subscribe{width:44%;}
548
+
549
+ .xyz_fbap_inmotion{width:44%;}
550
+
551
+ .xyz_fbap_sugession{width:44%;}
552
+
553
+ .xyz_fbap_our_plugins_new a{width:30%;}
554
+
555
+ .xyz_fbap_name{border:none !important; width:46% !important;}
556
+
557
+ .xyz_fbap_email{border:none !important; width:46% !important;}
558
+ }
559
+
560
+
561
+ @media screen and (max-width: 768px)
562
+ {
563
+ #xyz_fbap_submit_fbap{line-height:20px;}
564
+ .xyz_fbap_our_plugins_new a{width:30%; font-size:11px !important;}
565
+ }
566
+
567
+
568
+ @media screen and (max-width: 675px)
569
+ {
570
+ .xyz_fbap_our_plugins_new a{width:45%; font-size:11px !important;}
571
+ .xyz_fbap_name{border:none !important; width:95% !important;}
572
+ .xyz_fbap_email {
573
+ border: none !important;
574
+ width: 95% !important;
575
+ }
576
+ .xyz_fbap_inmotion_label {
577
+ height: 185px;
578
+ display: block;
579
+ margin: auto;
580
+ }
581
+ }
582
+
583
+
584
+ @media screen and (max-width: 562px)
585
+ {
586
+ .xyz_fbap_sugession{width:92.5%;}
587
+
588
+
589
+ .xyz_fbap_new_subscribe{width:92.5%;}
590
+
591
+
592
+ .xyz_fbap_social_media{width:92.5%;}
593
+ .xyz_fbap_inmotion{width:92.5%;}
594
+ .xyz_fbap_email {
595
+ border: none !important;
596
+ width: 95% !important;
597
+ }
598
+ }
599
+
600
+
601
+ @media screen and (max-width: 532px){
602
+
603
+
604
+ .xyz_fbap_social_media{width:92.5%;}
605
+
606
+ .xyz_fbap_new_subscribe{width:92.5%;}
607
+
608
+ .xyz_fbap_inmotion{width:92.5%;}
609
+
610
+ .xyz_fbap_sugession{width:92.5%;}
611
+
612
+ .xyz_fbap_our_plugins_new a{width:92.5%;}
613
+
614
+ .xyz_fbap_name{border:none !important; width:95% !important;}
615
+
616
+ .xyz_fbap_email{border:none !important; width:95% !important;}
617
+ }
618
+
619
+
620
+ /*new design end*/
621
+ .switch-field input[type=radio] {
622
+ position: absolute !important;
623
+ clip: rect(0, 0, 0, 0);
624
+ height: 1px;
625
+ width: 1px;
626
+ border: 0;
627
+ overflow: hidden;
628
+ }
629
+
630
+ .switch-field label {
631
+ float: left;
632
+ }
633
+
634
+ .switch-field label {
635
+ display: inline-block;
636
+ color: rgba(0, 0, 0, 0.6);
637
+ width: 50px;
638
+ font-weight: normal;
639
+ text-align: center;
640
+ text-shadow: none;
641
+ padding: 6px 14px;
642
+ -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.1);
643
+ box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.1);
644
+ -webkit-transition: all 0.1s ease-in-out;
645
+ -moz-transition: all 0.1s ease-in-out;
646
+ -ms-transition: all 0.1s ease-in-out;
647
+ -o-transition: all 0.1s ease-in-out;
648
+ transition: all 0.1s ease-in-out;
649
+ }
650
+ .switch-field label:hover {
651
+ cursor: pointer;
652
+ }
653
+ .switch-field label:first-of-type {
654
+ border-radius: 4px 0 0 4px;min-width: 50px;width:auto;
655
+ }
656
+ .switch-field label:last-of-type {
657
+ border-radius: 0 4px 4px 0;min-width: 50px;width:auto;
658
+ }
659
+ .scroll_checkbox
660
+ {
661
+ border: 2px solid #ccc;
662
+ width: 200px;
663
+ height: 150px;
664
+ overflow-y: scroll;
665
+ overflow-x: visible;
666
+ }
667
+ .toplevel_page_facebook-auto-publish-settings img{
668
+ width:20px;
669
+ height:auto;
670
+ }
671
+ .xyz_fbap_toggle_off
672
+ {
673
+ background-color:#dddddd !important;
674
+ color:#888888 !important;
675
+ font-weight:normal !important;
676
+ }
677
+ .xyz_fbap_toggle_on
678
+ {
679
+ background-color:#006CBF !important;
680
+ color:#ffffff !important;
681
+ font-weight:bold !important;
682
+ }
683
+ .xyz-fbap-buy-now{
684
+ float: left;
685
+ margin-top: 3px;
686
+ }
687
+ .xyz-fbap-buy-now img{
688
+ width:148px !important;
689
+ height:38px !important;
690
+ }
691
+ .xyz-fbap-buy-button {
692
+ display:block;
693
+ color:white;
694
+ padding:5px 21px;
695
+ background: #545454;
696
+ border: 0;
697
+ border-bottom: 2px solid #545454;
698
+ cursor: pointer;
699
+ -webkit-box-shadow: inset 0 -2px #545454;
700
+ box-shadow: inset 0 -2px #545454;
701
+ text-decoration: none;
702
+ font-size: 14px;
703
+ font-weight: bold;
704
+ border-radius:3px;
705
+ text-align: center;
706
+ }
707
+ .xyz_fbap_td_custom a {
708
+ font-size:13px;
709
+ }
710
+ /* Style the tab */
711
+ .xyz_fbap_tab {
712
+ overflow: hidden;
713
+ background-color: #f1f1f1;
714
+ }
715
+
716
+ /* Style the buttons inside the tab */
717
+ .xyz_fbap_tab button {
718
+ float: left;
719
+ border: none;
720
+ outline: none;
721
+ cursor: pointer;
722
+ padding: 14px 16px;
723
+ transition: 0.3s;
724
+ font-size: 17px;
725
+ background-color: #cecece;
726
+ color: #006CBF;
727
+ margin-right: 2px;
728
+ border-radius: 8px 8px 0px 0px;
729
+ border-top: 1px solid #b9aeae;
730
+ border-right: 1px solid #b9aeae;
731
+ border-left: 1px solid #b9aeae;
732
+ border-bottom: 1px solid #fff;
733
+ font-weight: 600;
734
+ }
735
+
736
+ /* Change background color of buttons on hover */
737
+ .xyz_fbap_tab button:hover {
738
+ background-color: #cecece;
739
+ }
740
+
741
+ /* Create an active/current tablink class */
742
+ .xyz_fbap_tab button.active {
743
+ background-color: #ffffff;
744
+ color: #006CBF;
745
+ }
746
+
747
+
748
+ /* Style the tab content */
749
+ .xyz_fbap_tabcontent {
750
+ display: none;
751
+ padding: 6px 12px;
752
+ border: 1px solid #ccc;
753
+ margin-top: -2px;
754
+ }
755
+
756
+
757
+ .xyz_fbap_widefat_table h2{color: #006CBF;}
facebook-auto-publish.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP Facebook Auto Publish
4
  Plugin URI: https://xyzscripts.com/wordpress-plugins/facebook-auto-publish/
5
  Description: Publish posts automatically from your blog to Facebook social media. You can publish your posts to Facebook as simple text message, text message with image or as attached link to your blog. The plugin supports filtering posts by custom post-types and categories.
6
- Version: 2.0.1
7
  Author: xyzscripts.com
8
  Author URI: https://xyzscripts.com/
9
  License: GPLv2 or later
@@ -39,7 +39,7 @@ if (!defined('XYZ_SMAP_SOLUTION_PUBLISH_URL'))
39
  define('XYZ_SMAP_SOLUTION_PUBLISH_URL','https://free-publish.smapsolutions.com/');
40
 
41
  global $wpdb;
42
- if(isset($_POST) && isset($_POST['fb_auth'] ) ||(isset($_GET['page']) && ($_GET['page']=='facebook-auto-publish-suggest-feature'))|| (isset($_GET['page']) && ($_GET['page']=='facebook-auto-publish-settings')) )
43
  {
44
  ob_start();
45
  }
@@ -49,7 +49,7 @@ require_once( dirname( __FILE__ ) . '/admin/menu.php' );
49
  require_once( dirname( __FILE__ ) . '/admin/destruction.php' );
50
  if (version_compare(PHP_VERSION, '5.4.0', '>'))
51
  {
52
- require_once( dirname( __FILE__ ) . '/api/Facebook/autoload.php');
53
  require_once( dirname( __FILE__ ) . '/admin/publish.php' );
54
  }
55
  require_once( dirname( __FILE__ ) . '/admin/ajax-backlink.php' );
3
  Plugin Name: WP Facebook Auto Publish
4
  Plugin URI: https://xyzscripts.com/wordpress-plugins/facebook-auto-publish/
5
  Description: Publish posts automatically from your blog to Facebook social media. You can publish your posts to Facebook as simple text message, text message with image or as attached link to your blog. The plugin supports filtering posts by custom post-types and categories.
6
+ Version: 2.1
7
  Author: xyzscripts.com
8
  Author URI: https://xyzscripts.com/
9
  License: GPLv2 or later
39
  define('XYZ_SMAP_SOLUTION_PUBLISH_URL','https://free-publish.smapsolutions.com/');
40
 
41
  global $wpdb;
42
+ if(isset($_POST) && isset($_POST['fb_auth'] ) ||(isset($_GET['page']) && ($_GET['page']=='facebook-auto-publish-suggest-feature'))|| (isset($_GET['page']) && ($_GET['page']=='facebook-auto-publish-settings')) || (isset($_GET['page']) && ($_GET['page']=='facebook-auto-publish-manage-authorizations')))
43
  {
44
  ob_start();
45
  }
49
  require_once( dirname( __FILE__ ) . '/admin/destruction.php' );
50
  if (version_compare(PHP_VERSION, '5.4.0', '>'))
51
  {
52
+ require_once( dirname( __FILE__ ) . '/vendor/autoload.php');
53
  require_once( dirname( __FILE__ ) . '/admin/publish.php' );
54
  }
55
  require_once( dirname( __FILE__ ) . '/admin/ajax-backlink.php' );
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: f1logic
3
  Donate link: https://xyzscripts.com/donate/
4
  Tags: facebook, facebook auto publish,wp facebook auto publish,publish post to facebook, add link to facebook, facebook publishing, post to facebook, post to fb, social media auto publish, social media publishing, social network auto publish, social media, social network
5
  Requires at least: 3.0
6
- Tested up to: 4.9.8
7
- Stable tag: 2.0.1
8
  License: GPLv2 or later
9
 
10
  Publish posts automatically to Facebook page or profile.
@@ -126,6 +126,13 @@ SSL peer verification may not be functioning in your server. Please turn off SSL
126
 
127
  == Changelog ==
128
 
 
 
 
 
 
 
 
129
  = WP Facebook Auto Publish 2.0.1 =
130
  * Fix for settings page auto refresh
131
 
3
  Donate link: https://xyzscripts.com/donate/
4
  Tags: facebook, facebook auto publish,wp facebook auto publish,publish post to facebook, add link to facebook, facebook publishing, post to facebook, post to fb, social media auto publish, social media publishing, social network auto publish, social media, social network
5
  Requires at least: 3.0
6
+ Tested up to: 5.0
7
+ Stable tag: 2.1
8
  License: GPLv2 or later
9
 
10
  Publish posts automatically to Facebook page or profile.
126
 
127
  == Changelog ==
128
 
129
+ = WP Facebook Auto Publish 2.1 =
130
+ * Added page for managing authorizations of smapsolutions app
131
+ * Compatibility with gutenberg editor
132
+ * Option to view social media posts from auto publish logs
133
+ * Settings menu reorganized
134
+ * Compatibility with PHP 7.2
135
+
136
  = WP Facebook Auto Publish 2.0.1 =
137
  * Fix for settings page auto refresh
138
 
vendor/autoload.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload.php @generated by Composer
4
+
5
+ require_once __DIR__ . '/composer/autoload_real.php';
6
+
7
+ return ComposerAutoloaderInit3266d324c7d6963186069d0185ef8785::getLoader();
vendor/composer/ClassLoader.php ADDED
@@ -0,0 +1,445 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Composer.
5
+ *
6
+ * (c) Nils Adermann <naderman@naderman.de>
7
+ * Jordi Boggiano <j.boggiano@seld.be>
8
+ *
9
+ * For the full copyright and license information, please view the LICENSE
10
+ * file that was distributed with this source code.
11
+ */
12
+
13
+ namespace Composer\Autoload;
14
+
15
+ /**
16
+ * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
17
+ *
18
+ * $loader = new \Composer\Autoload\ClassLoader();
19
+ *
20
+ * // register classes with namespaces
21
+ * $loader->add('Symfony\Component', __DIR__.'/component');
22
+ * $loader->add('Symfony', __DIR__.'/framework');
23
+ *
24
+ * // activate the autoloader
25
+ * $loader->register();
26
+ *
27
+ * // to enable searching the include path (eg. for PEAR packages)
28
+ * $loader->setUseIncludePath(true);
29
+ *
30
+ * In this example, if you try to use a class in the Symfony\Component
31
+ * namespace or one of its children (Symfony\Component\Console for instance),
32
+ * the autoloader will first look for the class under the component/
33
+ * directory, and it will then fallback to the framework/ directory if not
34
+ * found before giving up.
35
+ *
36
+ * This class is loosely based on the Symfony UniversalClassLoader.
37
+ *
38
+ * @author Fabien Potencier <fabien@symfony.com>
39
+ * @author Jordi Boggiano <j.boggiano@seld.be>
40
+ * @see http://www.php-fig.org/psr/psr-0/
41
+ * @see http://www.php-fig.org/psr/psr-4/
42
+ */
43
+ class ClassLoader
44
+ {
45
+ // PSR-4
46
+ private $prefixLengthsPsr4 = array();
47
+ private $prefixDirsPsr4 = array();
48
+ private $fallbackDirsPsr4 = array();
49
+
50
+ // PSR-0
51
+ private $prefixesPsr0 = array();
52
+ private $fallbackDirsPsr0 = array();
53
+
54
+ private $useIncludePath = false;
55
+ private $classMap = array();
56
+ private $classMapAuthoritative = false;
57
+ private $missingClasses = array();
58
+ private $apcuPrefix;
59
+
60
+ public function getPrefixes()
61
+ {
62
+ if (!empty($this->prefixesPsr0)) {
63
+ return call_user_func_array('array_merge', $this->prefixesPsr0);
64
+ }
65
+
66
+ return array();
67
+ }
68
+
69
+ public function getPrefixesPsr4()
70
+ {
71
+ return $this->prefixDirsPsr4;
72
+ }
73
+
74
+ public function getFallbackDirs()
75
+ {
76
+ return $this->fallbackDirsPsr0;
77
+ }
78
+
79
+ public function getFallbackDirsPsr4()
80
+ {
81
+ return $this->fallbackDirsPsr4;
82
+ }
83
+
84
+ public function getClassMap()
85
+ {
86
+ return $this->classMap;
87
+ }
88
+
89
+ /**
90
+ * @param array $classMap Class to filename map
91
+ */
92
+ public function addClassMap(array $classMap)
93
+ {
94
+ if ($this->classMap) {
95
+ $this->classMap = array_merge($this->classMap, $classMap);
96
+ } else {
97
+ $this->classMap = $classMap;
98
+ }
99
+ }
100
+
101
+ /**
102
+ * Registers a set of PSR-0 directories for a given prefix, either
103
+ * appending or prepending to the ones previously set for this prefix.
104
+ *
105
+ * @param string $prefix The prefix
106
+ * @param array|string $paths The PSR-0 root directories
107
+ * @param bool $prepend Whether to prepend the directories
108
+ */
109
+ public function add($prefix, $paths, $prepend = false)
110
+ {
111
+ if (!$prefix) {
112
+ if ($prepend) {
113
+ $this->fallbackDirsPsr0 = array_merge(
114
+ (array) $paths,
115
+ $this->fallbackDirsPsr0
116
+ );
117
+ } else {
118
+ $this->fallbackDirsPsr0 = array_merge(
119
+ $this->fallbackDirsPsr0,
120
+ (array) $paths
121
+ );
122
+ }
123
+
124
+ return;
125
+ }
126
+
127
+ $first = $prefix[0];
128
+ if (!isset($this->prefixesPsr0[$first][$prefix])) {
129
+ $this->prefixesPsr0[$first][$prefix] = (array) $paths;
130
+
131
+ return;
132
+ }
133
+ if ($prepend) {
134
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
135
+ (array) $paths,
136
+ $this->prefixesPsr0[$first][$prefix]
137
+ );
138
+ } else {
139
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
140
+ $this->prefixesPsr0[$first][$prefix],
141
+ (array) $paths
142
+ );
143
+ }
144
+ }
145
+
146
+ /**
147
+ * Registers a set of PSR-4 directories for a given namespace, either
148
+ * appending or prepending to the ones previously set for this namespace.
149
+ *
150
+ * @param string $prefix The prefix/namespace, with trailing '\\'
151
+ * @param array|string $paths The PSR-4 base directories
152
+ * @param bool $prepend Whether to prepend the directories
153
+ *
154
+ * @throws \InvalidArgumentException
155
+ */
156
+ public function addPsr4($prefix, $paths, $prepend = false)
157
+ {
158
+ if (!$prefix) {
159
+ // Register directories for the root namespace.
160
+ if ($prepend) {
161
+ $this->fallbackDirsPsr4 = array_merge(
162
+ (array) $paths,
163
+ $this->fallbackDirsPsr4
164
+ );
165
+ } else {
166
+ $this->fallbackDirsPsr4 = array_merge(
167
+ $this->fallbackDirsPsr4,
168
+ (array) $paths
169
+ );
170
+ }
171
+ } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
172
+ // Register directories for a new namespace.
173
+ $length = strlen($prefix);
174
+ if ('\\' !== $prefix[$length - 1]) {
175
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
176
+ }
177
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
178
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
179
+ } elseif ($prepend) {
180
+ // Prepend directories for an already registered namespace.
181
+ $this->prefixDirsPsr4[$prefix] = array_merge(
182
+ (array) $paths,
183
+ $this->prefixDirsPsr4[$prefix]
184
+ );
185
+ } else {
186
+ // Append directories for an already registered namespace.
187
+ $this->prefixDirsPsr4[$prefix] = array_merge(
188
+ $this->prefixDirsPsr4[$prefix],
189
+ (array) $paths
190
+ );
191
+ }
192
+ }
193
+
194
+ /**
195
+ * Registers a set of PSR-0 directories for a given prefix,
196
+ * replacing any others previously set for this prefix.
197
+ *
198
+ * @param string $prefix The prefix
199
+ * @param array|string $paths The PSR-0 base directories
200
+ */
201
+ public function set($prefix, $paths)
202
+ {
203
+ if (!$prefix) {
204
+ $this->fallbackDirsPsr0 = (array) $paths;
205
+ } else {
206
+ $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
207
+ }
208
+ }
209
+
210
+ /**
211
+ * Registers a set of PSR-4 directories for a given namespace,
212
+ * replacing any others previously set for this namespace.
213
+ *
214
+ * @param string $prefix The prefix/namespace, with trailing '\\'
215
+ * @param array|string $paths The PSR-4 base directories
216
+ *
217
+ * @throws \InvalidArgumentException
218
+ */
219
+ public function setPsr4($prefix, $paths)
220
+ {
221
+ if (!$prefix) {
222
+ $this->fallbackDirsPsr4 = (array) $paths;
223
+ } else {
224
+ $length = strlen($prefix);
225
+ if ('\\' !== $prefix[$length - 1]) {
226
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
227
+ }
228
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
229
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
230
+ }
231
+ }
232
+
233
+ /**
234
+ * Turns on searching the include path for class files.
235
+ *
236
+ * @param bool $useIncludePath
237
+ */
238
+ public function setUseIncludePath($useIncludePath)
239
+ {
240
+ $this->useIncludePath = $useIncludePath;
241
+ }
242
+
243
+ /**
244
+ * Can be used to check if the autoloader uses the include path to check
245
+ * for classes.
246
+ *
247
+ * @return bool
248
+ */
249
+ public function getUseIncludePath()
250
+ {
251
+ return $this->useIncludePath;
252
+ }
253
+
254
+ /**
255
+ * Turns off searching the prefix and fallback directories for classes
256
+ * that have not been registered with the class map.
257
+ *
258
+ * @param bool $classMapAuthoritative
259
+ */
260
+ public function setClassMapAuthoritative($classMapAuthoritative)
261
+ {
262
+ $this->classMapAuthoritative = $classMapAuthoritative;
263
+ }
264
+
265
+ /**
266
+ * Should class lookup fail if not found in the current class map?
267
+ *
268
+ * @return bool
269
+ */
270
+ public function isClassMapAuthoritative()
271
+ {
272
+ return $this->classMapAuthoritative;
273
+ }
274
+
275
+ /**
276
+ * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
277
+ *
278
+ * @param string|null $apcuPrefix
279
+ */
280
+ public function setApcuPrefix($apcuPrefix)
281
+ {
282
+ $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
283
+ }
284
+
285
+ /**
286
+ * The APCu prefix in use, or null if APCu caching is not enabled.
287
+ *
288
+ * @return string|null
289
+ */
290
+ public function getApcuPrefix()
291
+ {
292
+ return $this->apcuPrefix;
293
+ }
294
+
295
+ /**
296
+ * Registers this instance as an autoloader.
297
+ *
298
+ * @param bool $prepend Whether to prepend the autoloader or not
299
+ */
300
+ public function register($prepend = false)
301
+ {
302
+ spl_autoload_register(array($this, 'loadClass'), true, $prepend);
303
+ }
304
+
305
+ /**
306
+ * Unregisters this instance as an autoloader.
307
+ */
308
+ public function unregister()
309
+ {
310
+ spl_autoload_unregister(array($this, 'loadClass'));
311
+ }
312
+
313
+ /**
314
+ * Loads the given class or interface.
315
+ *
316
+ * @param string $class The name of the class
317
+ * @return bool|null True if loaded, null otherwise
318
+ */
319
+ public function loadClass($class)
320
+ {
321
+ if ($file = $this->findFile($class)) {
322
+ includeFile($file);
323
+
324
+ return true;
325
+ }
326
+ }
327
+
328
+ /**
329
+ * Finds the path to the file where the class is defined.
330
+ *
331
+ * @param string $class The name of the class
332
+ *
333
+ * @return string|false The path if found, false otherwise
334
+ */
335
+ public function findFile($class)
336
+ {
337
+ // class map lookup
338
+ if (isset($this->classMap[$class])) {
339
+ return $this->classMap[$class];
340
+ }
341
+ if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
342
+ return false;
343
+ }
344
+ if (null !== $this->apcuPrefix) {
345
+ $file = apcu_fetch($this->apcuPrefix.$class, $hit);
346
+ if ($hit) {
347
+ return $file;
348
+ }
349
+ }
350
+
351
+ $file = $this->findFileWithExtension($class, '.php');
352
+
353
+ // Search for Hack files if we are running on HHVM
354
+ if (false === $file && defined('HHVM_VERSION')) {
355
+ $file = $this->findFileWithExtension($class, '.hh');
356
+ }
357
+
358
+ if (null !== $this->apcuPrefix) {
359
+ apcu_add($this->apcuPrefix.$class, $file);
360
+ }
361
+
362
+ if (false === $file) {
363
+ // Remember that this class does not exist.
364
+ $this->missingClasses[$class] = true;
365
+ }
366
+
367
+ return $file;
368
+ }
369
+
370
+ private function findFileWithExtension($class, $ext)
371
+ {
372
+ // PSR-4 lookup
373
+ $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
374
+
375
+ $first = $class[0];
376
+ if (isset($this->prefixLengthsPsr4[$first])) {
377
+ $subPath = $class;
378
+ while (false !== $lastPos = strrpos($subPath, '\\')) {
379
+ $subPath = substr($subPath, 0, $lastPos);
380
+ $search = $subPath . '\\';
381
+ if (isset($this->prefixDirsPsr4[$search])) {
382
+ $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
383
+ foreach ($this->prefixDirsPsr4[$search] as $dir) {
384
+ if (file_exists($file = $dir . $pathEnd)) {
385
+ return $file;
386
+ }
387
+ }
388
+ }
389
+ }
390
+ }
391
+
392
+ // PSR-4 fallback dirs
393
+ foreach ($this->fallbackDirsPsr4 as $dir) {
394
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
395
+ return $file;
396
+ }
397
+ }
398
+
399
+ // PSR-0 lookup
400
+ if (false !== $pos = strrpos($class, '\\')) {
401
+ // namespaced class name
402
+ $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
403
+ . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
404
+ } else {
405
+ // PEAR-like class name
406
+ $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
407
+ }
408
+
409
+ if (isset($this->prefixesPsr0[$first])) {
410
+ foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
411
+ if (0 === strpos($class, $prefix)) {
412
+ foreach ($dirs as $dir) {
413
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
414
+ return $file;
415
+ }
416
+ }
417
+ }
418
+ }
419
+ }
420
+
421
+ // PSR-0 fallback dirs
422
+ foreach ($this->fallbackDirsPsr0 as $dir) {
423
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
424
+ return $file;
425
+ }
426
+ }
427
+
428
+ // PSR-0 include paths.
429
+ if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
430
+ return $file;
431
+ }
432
+
433
+ return false;
434
+ }
435
+ }
436
+
437
+ /**
438
+ * Scope isolated include.
439
+ *
440
+ * Prevents access to $this/self from included files.
441
+ */
442
+ function includeFile($file)
443
+ {
444
+ include $file;
445
+ }
vendor/composer/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ Copyright (c) Nils Adermann, Jordi Boggiano
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is furnished
9
+ to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
+ THE SOFTWARE.
21
+
vendor/composer/autoload_classmap.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_classmap.php @generated by Composer
4
+
5
+ $vendorDir = dirname(dirname(__FILE__));
6
+ $baseDir = dirname($vendorDir);
7
+
8
+ return array(
9
+ );
vendor/composer/autoload_files.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_files.php @generated by Composer
4
+
5
+ $vendorDir = dirname(dirname(__FILE__));
6
+ $baseDir = dirname($vendorDir);
7
+
8
+ return array(
9
+ 'c65d09b6820da036953a371c8c73a9b1' => $vendorDir . '/facebook/graph-sdk/src/Facebook/polyfills.php',
10
+ );
vendor/composer/autoload_namespaces.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_namespaces.php @generated by Composer
4
+
5
+ $vendorDir = dirname(dirname(__FILE__));
6
+ $baseDir = dirname($vendorDir);
7
+
8
+ return array(
9
+ );
vendor/composer/autoload_psr4.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_psr4.php @generated by Composer
4
+
5
+ $vendorDir = dirname(dirname(__FILE__));
6
+ $baseDir = dirname($vendorDir);
7
+
8
+ return array(
9
+ 'Facebook\\' => array($vendorDir . '/facebook/graph-sdk/src/Facebook'),
10
+ );
vendor/composer/autoload_real.php ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_real.php @generated by Composer
4
+
5
+ class ComposerAutoloaderInit3266d324c7d6963186069d0185ef8785
6
+ {
7
+ private static $loader;
8
+
9
+ public static function loadClassLoader($class)
10
+ {
11
+ if ('Composer\Autoload\ClassLoader' === $class) {
12
+ require __DIR__ . '/ClassLoader.php';
13
+ }
14
+ }
15
+
16
+ public static function getLoader()
17
+ {
18
+ if (null !== self::$loader) {
19
+ return self::$loader;
20
+ }
21
+
22
+ spl_autoload_register(array('ComposerAutoloaderInit3266d324c7d6963186069d0185ef8785', 'loadClassLoader'), true, true);
23
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit3266d324c7d6963186069d0185ef8785', 'loadClassLoader'));
25
+
26
+ $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
+ if ($useStaticLoader) {
28
+ require_once __DIR__ . '/autoload_static.php';
29
+
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit3266d324c7d6963186069d0185ef8785::getInitializer($loader));
31
+ } else {
32
+ $map = require __DIR__ . '/autoload_namespaces.php';
33
+ foreach ($map as $namespace => $path) {
34
+ $loader->set($namespace, $path);
35
+ }
36
+
37
+ $map = require __DIR__ . '/autoload_psr4.php';
38
+ foreach ($map as $namespace => $path) {
39
+ $loader->setPsr4($namespace, $path);
40
+ }
41
+
42
+ $classMap = require __DIR__ . '/autoload_classmap.php';
43
+ if ($classMap) {
44
+ $loader->addClassMap($classMap);
45
+ }
46
+ }
47
+
48
+ $loader->register(true);
49
+
50
+ if ($useStaticLoader) {
51
+ $includeFiles = Composer\Autoload\ComposerStaticInit3266d324c7d6963186069d0185ef8785::$files;
52
+ } else {
53
+ $includeFiles = require __DIR__ . '/autoload_files.php';
54
+ }
55
+ foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequire3266d324c7d6963186069d0185ef8785($fileIdentifier, $file);
57
+ }
58
+
59
+ return $loader;
60
+ }
61
+ }
62
+
63
+ function composerRequire3266d324c7d6963186069d0185ef8785($fileIdentifier, $file)
64
+ {
65
+ if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
+ require $file;
67
+
68
+ $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
69
+ }
70
+ }
vendor/composer/autoload_static.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_static.php @generated by Composer
4
+
5
+ namespace Composer\Autoload;
6
+
7
+ class ComposerStaticInit3266d324c7d6963186069d0185ef8785
8
+ {
9
+ public static $files = array (
10
+ 'c65d09b6820da036953a371c8c73a9b1' => __DIR__ . '/..' . '/facebook/graph-sdk/src/Facebook/polyfills.php',
11
+ );
12
+
13
+ public static $prefixLengthsPsr4 = array (
14
+ 'F' =>
15
+ array (
16
+ 'Facebook\\' => 9,
17
+ ),
18
+ );
19
+
20
+ public static $prefixDirsPsr4 = array (
21
+ 'Facebook\\' =>
22
+ array (
23
+ 0 => __DIR__ . '/..' . '/facebook/graph-sdk/src/Facebook',
24
+ ),
25
+ );
26
+
27
+ public static function getInitializer(ClassLoader $loader)
28
+ {
29
+ return \Closure::bind(function () use ($loader) {
30
+ $loader->prefixLengthsPsr4 = ComposerStaticInit3266d324c7d6963186069d0185ef8785::$prefixLengthsPsr4;
31
+ $loader->prefixDirsPsr4 = ComposerStaticInit3266d324c7d6963186069d0185ef8785::$prefixDirsPsr4;
32
+
33
+ }, null, ClassLoader::class);
34
+ }
35
+ }
vendor/composer/installed.json ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "name": "facebook/graph-sdk",
4
+ "version": "5.6.3",
5
+ "version_normalized": "5.6.3.0",
6
+ "source": {
7
+ "type": "git",
8
+ "url": "https://github.com/facebook/php-graph-sdk.git",
9
+ "reference": "90e92bd1816fe718e55184ab85910dfcf488432c"
10
+ },
11
+ "dist": {
12
+ "type": "zip",
13
+ "url": "https://api.github.com/repos/facebook/php-graph-sdk/zipball/90e92bd1816fe718e55184ab85910dfcf488432c",
14
+ "reference": "90e92bd1816fe718e55184ab85910dfcf488432c",
15
+ "shasum": ""
16
+ },
17
+ "require": {
18
+ "php": "^5.4|^7.0"
19
+ },
20
+ "require-dev": {
21
+ "guzzlehttp/guzzle": "~5.0",
22
+ "mockery/mockery": "~0.8",
23
+ "phpunit/phpunit": "~4.0"
24
+ },
25
+ "suggest": {
26
+ "guzzlehttp/guzzle": "Allows for implementation of the Guzzle HTTP client",
27
+ "paragonie/random_compat": "Provides a better CSPRNG option in PHP 5"
28
+ },
29
+ "time": "2018-07-03T02:25:00+00:00",
30
+ "type": "library",
31
+ "extra": {
32
+ "branch-alias": {
33
+ "dev-master": "5.x-dev"
34
+ }
35
+ },
36
+ "installation-source": "dist",
37
+ "autoload": {
38
+ "psr-4": {
39
+ "Facebook\\": "src/Facebook/"
40
+ },
41
+ "files": [
42
+ "src/Facebook/polyfills.php"
43
+ ]
44
+ },
45
+ "notification-url": "https://packagist.org/downloads/",
46
+ "license": [
47
+ "Facebook Platform"
48
+ ],
49
+ "authors": [
50
+ {
51
+ "name": "Facebook",
52
+ "homepage": "https://github.com/facebook/php-graph-sdk/contributors"
53
+ }
54
+ ],
55
+ "description": "Facebook SDK for PHP",
56
+ "homepage": "https://github.com/facebook/php-graph-sdk",
57
+ "keywords": [
58
+ "facebook",
59
+ "sdk"
60
+ ]
61
+ }
62
+ ]
vendor/facebook/graph-sdk/CODE_OF_CONDUCT.md ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ # Code of Conduct
2
+
3
+ Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](https://code.facebook.com/codeofconduct) so that you can understand what actions will and will not be tolerated.
vendor/facebook/graph-sdk/LICENSE ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright 2017 Facebook, Inc.
2
+
3
+ You are hereby granted a non-exclusive, worldwide, royalty-free license to
4
+ use, copy, modify, and distribute this software in source code or binary
5
+ form for use in connection with the web services and APIs provided by
6
+ Facebook.
7
+
8
+ As with any software that integrates with the Facebook platform, your use
9
+ of this software is subject to the Facebook Developer Principles and
10
+ Policies [http://developers.facebook.com/policy/]. This copyright notice
11
+ shall be included in all copies or substantial portions of the software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
16
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
19
+ DEALINGS IN THE SOFTWARE.
vendor/facebook/graph-sdk/composer.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "facebook/graph-sdk",
3
+ "description": "Facebook SDK for PHP",
4
+ "keywords": ["facebook", "sdk"],
5
+ "type": "library",
6
+ "homepage": "https://github.com/facebook/php-graph-sdk",
7
+ "license": "Facebook Platform",
8
+ "authors": [
9
+ {
10
+ "name": "Facebook",
11
+ "homepage": "https://github.com/facebook/php-graph-sdk/contributors"
12
+ }
13
+ ],
14
+ "require": {
15
+ "php": "^5.4|^7.0"
16
+ },
17
+ "require-dev": {
18
+ "phpunit/phpunit": "~4.0",
19
+ "mockery/mockery": "~0.8",
20
+ "guzzlehttp/guzzle": "~5.0"
21
+ },
22
+ "suggest": {
23
+ "paragonie/random_compat": "Provides a better CSPRNG option in PHP 5",
24
+ "guzzlehttp/guzzle": "Allows for implementation of the Guzzle HTTP client"
25
+ },
26
+ "autoload": {
27
+ "psr-4": {
28
+ "Facebook\\": "src/Facebook/"
29
+ },
30
+ "files": ["src/Facebook/polyfills.php"]
31
+ },
32
+ "autoload-dev": {
33
+ "psr-4": {
34
+ "Facebook\\Tests\\": "tests/"
35
+ }
36
+ },
37
+ "extra": {
38
+ "branch-alias": {
39
+ "dev-master": "5.x-dev"
40
+ }
41
+ }
42
+ }
vendor/facebook/graph-sdk/phpcs.xml.dist ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <ruleset>
3
+ <file>src/</file>
4
+ <file>tests/</file>
5
+ <arg value="spn" />
6
+ <rule ref="PSR2" />
7
+ </ruleset>
{api → vendor/facebook/graph-sdk/src}/Facebook/Authentication/AccessToken.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/Authentication/AccessTokenMetadata.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/Authentication/OAuth2Client.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
@@ -125,8 +125,8 @@ class OAuth2Client
125
  * Generates an authorization URL to begin the process of authenticating a user.
126
  *
127
  * @param string $redirectUrl The callback URL to redirect to.
128
- * @param array $scope An array of permissions to request.
129
  * @param string $state The CSPRNG-generated CSRF value.
 
130
  * @param array $params An array of parameters to generate URL.
131
  * @param string $separator The separator to use in http_build_query().
132
  *
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
125
  * Generates an authorization URL to begin the process of authenticating a user.
126
  *
127
  * @param string $redirectUrl The callback URL to redirect to.
 
128
  * @param string $state The CSPRNG-generated CSRF value.
129
+ * @param array $scope An array of permissions to request.
130
  * @param array $params An array of parameters to generate URL.
131
  * @param string $separator The separator to use in http_build_query().
132
  *
{api → vendor/facebook/graph-sdk/src}/Facebook/Exceptions/FacebookAuthenticationException.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/Exceptions/FacebookAuthorizationException.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/Exceptions/FacebookClientException.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/Exceptions/FacebookOtherException.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/Exceptions/FacebookResponseException.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
@@ -113,7 +113,9 @@ class FacebookResponseException extends FacebookSDKException
113
  // API Throttling
114
  case 4:
115
  case 17:
 
116
  case 341:
 
117
  return new static($response, new FacebookThrottleException($message, $code));
118
 
119
  // Duplicate Post
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
113
  // API Throttling
114
  case 4:
115
  case 17:
116
+ case 32:
117
  case 341:
118
+ case 613:
119
  return new static($response, new FacebookThrottleException($message, $code));
120
 
121
  // Duplicate Post
{api → vendor/facebook/graph-sdk/src}/Facebook/Exceptions/FacebookResumableUploadException.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/Exceptions/FacebookSDKException.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/Exceptions/FacebookServerException.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/Exceptions/FacebookThrottleException.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/Facebook.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
@@ -53,12 +53,12 @@ class Facebook
53
  /**
54
  * @const string Version number of the Facebook PHP SDK.
55
  */
56
- const VERSION = '5.2.0';
57
 
58
  /**
59
  * @const string Default Graph API version for requests.
60
  */
61
- const DEFAULT_GRAPH_VERSION = 'v2.6';
62
 
63
  /**
64
  * @const string The name of the environment variable that contains the app ID.
@@ -494,6 +494,27 @@ class Facebook
494
  return $this->lastResponse = $this->client->sendBatchRequest($batchRequest);
495
  }
496
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
497
  /**
498
  * Instantiates a new FacebookRequest entity.
499
  *
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
53
  /**
54
  * @const string Version number of the Facebook PHP SDK.
55
  */
56
+ const VERSION = '5.6.3';
57
 
58
  /**
59
  * @const string Default Graph API version for requests.
60
  */
61
+ const DEFAULT_GRAPH_VERSION = 'v2.10';
62
 
63
  /**
64
  * @const string The name of the environment variable that contains the app ID.
494
  return $this->lastResponse = $this->client->sendBatchRequest($batchRequest);
495
  }
496
 
497
+ /**
498
+ * Instantiates an empty FacebookBatchRequest entity.
499
+ *
500
+ * @param AccessToken|string|null $accessToken The top-level access token. Requests with no access token
501
+ * will fallback to this.
502
+ * @param string|null $graphVersion The Graph API version to use.
503
+ * @return FacebookBatchRequest
504
+ */
505
+ public function newBatchRequest($accessToken = null, $graphVersion = null)
506
+ {
507
+ $accessToken = $accessToken ?: $this->defaultAccessToken;
508
+ $graphVersion = $graphVersion ?: $this->defaultGraphVersion;
509
+
510
+ return new FacebookBatchRequest(
511
+ $this->app,
512
+ [],
513
+ $accessToken,
514
+ $graphVersion
515
+ );
516
+ }
517
+
518
  /**
519
  * Instantiates a new FacebookRequest entity.
520
  *
{api → vendor/facebook/graph-sdk/src}/Facebook/FacebookApp.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/FacebookBatchRequest.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
@@ -39,7 +39,7 @@ class FacebookBatchRequest extends FacebookRequest implements IteratorAggregate,
39
  /**
40
  * @var array An array of FacebookRequest entities to send.
41
  */
42
- protected $requests;
43
 
44
  /**
45
  * @var array An array of files to upload.
@@ -62,16 +62,17 @@ class FacebookBatchRequest extends FacebookRequest implements IteratorAggregate,
62
  }
63
 
64
  /**
65
- * A a new request to the array.
66
  *
67
  * @param FacebookRequest|array $request
68
- * @param string|null $name
 
69
  *
70
  * @return FacebookBatchRequest
71
  *
72
  * @throws \InvalidArgumentException
73
  */
74
- public function add($request, $name = null)
75
  {
76
  if (is_array($request)) {
77
  foreach ($request as $key => $req) {
@@ -85,17 +86,28 @@ class FacebookBatchRequest extends FacebookRequest implements IteratorAggregate,
85
  throw new \InvalidArgumentException('Argument for add() must be of type array or FacebookRequest.');
86
  }
87
 
 
 
 
 
 
 
88
  $this->addFallbackDefaults($request);
 
 
 
 
 
 
 
 
89
  $requestToAdd = [
90
  'name' => $name,
91
  'request' => $request,
 
 
92
  ];
93
 
94
- // File uploads
95
- $attachedFiles = $this->extractFileAttachments($request);
96
- if ($attachedFiles) {
97
- $requestToAdd['attached_files'] = $attachedFiles;
98
- }
99
  $this->requests[] = $requestToAdd;
100
 
101
  return $this;
@@ -168,8 +180,6 @@ class FacebookBatchRequest extends FacebookRequest implements IteratorAggregate,
168
 
169
  /**
170
  * Prepares the requests to be sent as a batch request.
171
- *
172
- * @return string
173
  */
174
  public function prepareRequestsForBatch()
175
  {
@@ -191,8 +201,15 @@ class FacebookBatchRequest extends FacebookRequest implements IteratorAggregate,
191
  {
192
  $requests = [];
193
  foreach ($this->requests as $request) {
194
- $attachedFiles = isset($request['attached_files']) ? $request['attached_files'] : null;
195
- $requests[] = $this->requestEntityToBatchArray($request['request'], $request['name'], $attachedFiles);
 
 
 
 
 
 
 
196
  }
197
 
198
  return json_encode($requests);
@@ -217,14 +234,22 @@ class FacebookBatchRequest extends FacebookRequest implements IteratorAggregate,
217
  /**
218
  * Converts a Request entity into an array that is batch-friendly.
219
  *
220
- * @param FacebookRequest $request The request entity to convert.
221
- * @param string|null $requestName The name of the request.
222
- * @param string|null $attachedFiles Names of files associated with the request.
 
223
  *
224
  * @return array
225
  */
226
- public function requestEntityToBatchArray(FacebookRequest $request, $requestName = null, $attachedFiles = null)
227
  {
 
 
 
 
 
 
 
228
  $compiledHeaders = [];
229
  $headers = $request->getHeaders();
230
  foreach ($headers as $name => $value) {
@@ -244,18 +269,12 @@ class FacebookBatchRequest extends FacebookRequest implements IteratorAggregate,
244
  $batch['body'] = $body;
245
  }
246
 
247
- if (isset($requestName)) {
248
- $batch['name'] = $requestName;
249
- }
250
 
251
- if (isset($attachedFiles)) {
252
  $batch['attached_files'] = $attachedFiles;
253
  }
254
 
255
- // @TODO Add support for "omit_response_on_success"
256
- // @TODO Add support for "depends_on"
257
- // @TODO Add support for JSONP with "callback"
258
-
259
  return $batch;
260
  }
261
 
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
39
  /**
40
  * @var array An array of FacebookRequest entities to send.
41
  */
42
+ protected $requests = [];
43
 
44
  /**
45
  * @var array An array of files to upload.
62
  }
63
 
64
  /**
65
+ * Adds a new request to the array.
66
  *
67
  * @param FacebookRequest|array $request
68
+ * @param string|null|array $options Array of batch request options e.g. 'name', 'omit_response_on_success'.
69
+ * If a string is given, it is the value of the 'name' option.
70
  *
71
  * @return FacebookBatchRequest
72
  *
73
  * @throws \InvalidArgumentException
74
  */
75
+ public function add($request, $options = null)
76
  {
77
  if (is_array($request)) {
78
  foreach ($request as $key => $req) {
86
  throw new \InvalidArgumentException('Argument for add() must be of type array or FacebookRequest.');
87
  }
88
 
89
+ if (null === $options) {
90
+ $options = [];
91
+ } elseif (!is_array($options)) {
92
+ $options = ['name' => $options];
93
+ }
94
+
95
  $this->addFallbackDefaults($request);
96
+
97
+ // File uploads
98
+ $attachedFiles = $this->extractFileAttachments($request);
99
+
100
+ $name = isset($options['name']) ? $options['name'] : null;
101
+
102
+ unset($options['name']);
103
+
104
  $requestToAdd = [
105
  'name' => $name,
106
  'request' => $request,
107
+ 'options' => $options,
108
+ 'attached_files' => $attachedFiles,
109
  ];
110
 
 
 
 
 
 
111
  $this->requests[] = $requestToAdd;
112
 
113
  return $this;
180
 
181
  /**
182
  * Prepares the requests to be sent as a batch request.
 
 
183
  */
184
  public function prepareRequestsForBatch()
185
  {
201
  {
202
  $requests = [];
203
  foreach ($this->requests as $request) {
204
+ $options = [];
205
+
206
+ if (null !== $request['name']) {
207
+ $options['name'] = $request['name'];
208
+ }
209
+
210
+ $options += $request['options'];
211
+
212
+ $requests[] = $this->requestEntityToBatchArray($request['request'], $options, $request['attached_files']);
213
  }
214
 
215
  return json_encode($requests);
234
  /**
235
  * Converts a Request entity into an array that is batch-friendly.
236
  *
237
+ * @param FacebookRequest $request The request entity to convert.
238
+ * @param string|null|array $options Array of batch request options e.g. 'name', 'omit_response_on_success'.
239
+ * If a string is given, it is the value of the 'name' option.
240
+ * @param string|null $attachedFiles Names of files associated with the request.
241
  *
242
  * @return array
243
  */
244
+ public function requestEntityToBatchArray(FacebookRequest $request, $options = null, $attachedFiles = null)
245
  {
246
+
247
+ if (null === $options) {
248
+ $options = [];
249
+ } elseif (!is_array($options)) {
250
+ $options = ['name' => $options];
251
+ }
252
+
253
  $compiledHeaders = [];
254
  $headers = $request->getHeaders();
255
  foreach ($headers as $name => $value) {
269
  $batch['body'] = $body;
270
  }
271
 
272
+ $batch += $options;
 
 
273
 
274
+ if (null !== $attachedFiles) {
275
  $batch['attached_files'] = $attachedFiles;
276
  }
277
 
 
 
 
 
278
  return $batch;
279
  }
280
 
{api → vendor/facebook/graph-sdk/src}/Facebook/FacebookBatchResponse.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/FacebookClient.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/FacebookRequest.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
@@ -108,7 +108,7 @@ class FacebookRequest
108
  /**
109
  * Set the access token for this request.
110
  *
111
- * @param AccessToken|string
112
  *
113
  * @return FacebookRequest
114
  */
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
108
  /**
109
  * Set the access token for this request.
110
  *
111
+ * @param AccessToken|string|null
112
  *
113
  * @return FacebookRequest
114
  */
{api → vendor/facebook/graph-sdk/src}/Facebook/FacebookResponse.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/FileUpload/FacebookFile.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/FileUpload/FacebookResumableUploader.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/FileUpload/FacebookTransferChunk.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/FileUpload/FacebookVideo.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/FileUpload/Mimetypes.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
@@ -724,6 +724,7 @@ class Mimetypes
724
  'spq' => 'application/scvp-vp-request',
725
  'spx' => 'audio/ogg',
726
  'src' => 'application/x-wais-source',
 
727
  'sru' => 'application/sru+xml',
728
  'srx' => 'application/sparql-results+xml',
729
  'sse' => 'application/vnd.kodak-descriptor',
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
724
  'spq' => 'application/scvp-vp-request',
725
  'spx' => 'audio/ogg',
726
  'src' => 'application/x-wais-source',
727
+ 'srt' => 'application/octet-stream',
728
  'sru' => 'application/sru+xml',
729
  'srx' => 'application/sparql-results+xml',
730
  'sse' => 'application/vnd.kodak-descriptor',
{api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/Birthday.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/Collection.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphAchievement.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
@@ -28,7 +28,6 @@ namespace Facebook\GraphNodes;
28
  *
29
  * @package Facebook
30
  */
31
-
32
  class GraphAchievement extends GraphNode
33
  {
34
  /**
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
28
  *
29
  * @package Facebook
30
  */
 
31
  class GraphAchievement extends GraphNode
32
  {
33
  /**
{api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphAlbum.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphApplication.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphCoverPhoto.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphEdge.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
@@ -235,4 +235,18 @@ class GraphEdge extends Collection
235
 
236
  return null;
237
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
238
  }
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
235
 
236
  return null;
237
  }
238
+
239
+ /**
240
+ * @inheritDoc
241
+ */
242
+ public function map(\Closure $callback)
243
+ {
244
+ return new static(
245
+ $this->request,
246
+ array_map($callback, $this->items, array_keys($this->items)),
247
+ $this->metaData,
248
+ $this->parentEdgeEndpoint,
249
+ $this->subclassName
250
+ );
251
+ }
252
  }
{api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphEvent.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphGroup.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphList.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphLocation.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphNode.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphNodeFactory.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphObject.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphObjectFactory.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphPage.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
@@ -37,6 +37,8 @@ class GraphPage extends GraphNode
37
  'best_page' => '\Facebook\GraphNodes\GraphPage',
38
  'global_brand_parent_page' => '\Facebook\GraphNodes\GraphPage',
39
  'location' => '\Facebook\GraphNodes\GraphLocation',
 
 
40
  ];
41
 
42
  /**
@@ -99,6 +101,26 @@ class GraphPage extends GraphNode
99
  return $this->getField('location');
100
  }
101
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  /**
103
  * Returns the page access token for the admin user.
104
  *
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
37
  'best_page' => '\Facebook\GraphNodes\GraphPage',
38
  'global_brand_parent_page' => '\Facebook\GraphNodes\GraphPage',
39
  'location' => '\Facebook\GraphNodes\GraphLocation',
40
+ 'cover' => '\Facebook\GraphNodes\GraphCoverPhoto',
41
+ 'picture' => '\Facebook\GraphNodes\GraphPicture',
42
  ];
43
 
44
  /**
101
  return $this->getField('location');
102
  }
103
 
104
+ /**
105
+ * Returns CoverPhoto of the Page.
106
+ *
107
+ * @return GraphCoverPhoto|null
108
+ */
109
+ public function getCover()
110
+ {
111
+ return $this->getField('cover');
112
+ }
113
+
114
+ /**
115
+ * Returns Picture of the Page.
116
+ *
117
+ * @return GraphPicture|null
118
+ */
119
+ public function getPicture()
120
+ {
121
+ return $this->getField('picture');
122
+ }
123
+
124
  /**
125
  * Returns the page access token for the admin user.
126
  *
{api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphPicture.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphSessionInfo.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/GraphNodes/GraphUser.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
@@ -123,7 +123,7 @@ class GraphUser extends GraphNode
123
  /**
124
  * Returns the users birthday, if available.
125
  *
126
- * @return \DateTime|null
127
  */
128
  public function getBirthday()
129
  {
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
123
  /**
124
  * Returns the users birthday, if available.
125
  *
126
+ * @return Birthday|null
127
  */
128
  public function getBirthday()
129
  {
{api → vendor/facebook/graph-sdk/src}/Facebook/Helpers/FacebookCanvasHelper.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/Helpers/FacebookJavaScriptHelper.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/Helpers/FacebookPageTabHelper.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/Helpers/FacebookRedirectLoginHelper.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
@@ -122,7 +122,7 @@ class FacebookRedirectLoginHelper
122
  */
123
  private function makeUrl($redirectUrl, array $scope, array $params = [], $separator = '&')
124
  {
125
- $state = $this->pseudoRandomStringGenerator->getPseudoRandomString(static::CSRF_LENGTH);
126
  $this->persistentDataHandler->set('state', $state);
127
 
128
  return $this->oAuth2Client->getAuthorizationUrl($redirectUrl, $state, $scope, $params, $separator);
@@ -219,10 +219,11 @@ class FacebookRedirectLoginHelper
219
  }
220
 
221
  $this->validateCsrf();
 
222
 
223
  $redirectUrl = $redirectUrl ?: $this->urlDetectionHandler->getCurrentUrl();
224
- // At minimum we need to remove the state param
225
- $redirectUrl = FacebookUrlManipulator::removeParamsFromUrl($redirectUrl, ['state']);
226
 
227
  return $this->oAuth2Client->getAccessTokenFromCode($code, $redirectUrl);
228
  }
@@ -250,6 +251,14 @@ class FacebookRedirectLoginHelper
250
  throw new FacebookSDKException('Cross-site request forgery validation failed. The "state" param from the URL and session do not match.');
251
  }
252
 
 
 
 
 
 
 
 
 
253
  /**
254
  * Return the code.
255
  *
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
122
  */
123
  private function makeUrl($redirectUrl, array $scope, array $params = [], $separator = '&')
124
  {
125
+ $state = $this->persistentDataHandler->get('state') ?: $this->pseudoRandomStringGenerator->getPseudoRandomString(static::CSRF_LENGTH);
126
  $this->persistentDataHandler->set('state', $state);
127
 
128
  return $this->oAuth2Client->getAuthorizationUrl($redirectUrl, $state, $scope, $params, $separator);
219
  }
220
 
221
  $this->validateCsrf();
222
+ $this->resetCsrf();
223
 
224
  $redirectUrl = $redirectUrl ?: $this->urlDetectionHandler->getCurrentUrl();
225
+ // At minimum we need to remove the 'state' and 'code' params
226
+ $redirectUrl = FacebookUrlManipulator::removeParamsFromUrl($redirectUrl, ['code', 'state']);
227
 
228
  return $this->oAuth2Client->getAccessTokenFromCode($code, $redirectUrl);
229
  }
251
  throw new FacebookSDKException('Cross-site request forgery validation failed. The "state" param from the URL and session do not match.');
252
  }
253
 
254
+ /**
255
+ * Resets the CSRF so that it doesn't get reused.
256
+ */
257
+ private function resetCsrf()
258
+ {
259
+ $this->persistentDataHandler->set('state', null);
260
+ }
261
+
262
  /**
263
  * Return the code.
264
  *
{api → vendor/facebook/graph-sdk/src}/Facebook/Helpers/FacebookSignedRequestFromInputHelper.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/Http/GraphRawResponse.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
@@ -129,7 +129,7 @@ class GraphRawResponse
129
  if (strpos($line, ': ') === false) {
130
  $this->setHttpResponseCodeFromHeader($line);
131
  } else {
132
- list($key, $value) = explode(': ', $line);
133
  $this->headers[$key] = $value;
134
  }
135
  }
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
129
  if (strpos($line, ': ') === false) {
130
  $this->setHttpResponseCodeFromHeader($line);
131
  } else {
132
+ list($key, $value) = explode(': ', $line, 2);
133
  $this->headers[$key] = $value;
134
  }
135
  }
{api → vendor/facebook/graph-sdk/src}/Facebook/Http/RequestBodyInterface.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/Http/RequestBodyMultipart.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/Http/RequestBodyUrlEncoded.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/HttpClients/FacebookCurl.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/HttpClients/FacebookCurlHttpClient.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
@@ -98,7 +98,7 @@ class FacebookCurlHttpClient implements FacebookHttpClientInterface
98
  CURLOPT_URL => $url,
99
  CURLOPT_CONNECTTIMEOUT => 10,
100
  CURLOPT_TIMEOUT => $timeOut,
101
- CURLOPT_RETURNTRANSFER => true, // Follow 301 redirects
102
  CURLOPT_HEADER => true, // Enable header processing
103
  CURLOPT_SSL_VERIFYHOST => 2,
104
  CURLOPT_SSL_VERIFYPEER => true,
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
98
  CURLOPT_URL => $url,
99
  CURLOPT_CONNECTTIMEOUT => 10,
100
  CURLOPT_TIMEOUT => $timeOut,
101
+ CURLOPT_RETURNTRANSFER => true, // Return response as string
102
  CURLOPT_HEADER => true, // Enable header processing
103
  CURLOPT_SSL_VERIFYHOST => 2,
104
  CURLOPT_SSL_VERIFYPEER => true,
{api → vendor/facebook/graph-sdk/src}/Facebook/HttpClients/FacebookGuzzleHttpClient.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/HttpClients/FacebookHttpClientInterface.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/HttpClients/FacebookStream.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/HttpClients/FacebookStreamHttpClient.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/HttpClients/HttpClientsFactory.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/HttpClients/certs/DigiCertHighAssuranceEVRootCA.pem RENAMED
File without changes
{api → vendor/facebook/graph-sdk/src}/Facebook/PersistentData/FacebookMemoryPersistentDataHandler.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/PersistentData/FacebookSessionPersistentDataHandler.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/PersistentData/PersistentDataFactory.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/PersistentData/PersistentDataInterface.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/PseudoRandomString/McryptPseudoRandomStringGenerator.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/PseudoRandomString/OpenSslPseudoRandomStringGenerator.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/PseudoRandomString/PseudoRandomStringGeneratorFactory.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
@@ -38,7 +38,7 @@ class PseudoRandomStringGeneratorFactory
38
  *
39
  * @param PseudoRandomStringGeneratorInterface|string|null $generator
40
  *
41
- * @throws InvalidArgumentException If the pseudo random string generator must be set to "mcrypt", "openssl", or "urandom", or be an instance of Facebook\PseudoRandomString\PseudoRandomStringGeneratorInterface.
42
  *
43
  * @return PseudoRandomStringGeneratorInterface
44
  */
@@ -52,6 +52,9 @@ class PseudoRandomStringGeneratorFactory
52
  return $generator;
53
  }
54
 
 
 
 
55
  if ('mcrypt' === $generator) {
56
  return new McryptPseudoRandomStringGenerator();
57
  }
@@ -62,7 +65,7 @@ class PseudoRandomStringGeneratorFactory
62
  return new UrandomPseudoRandomStringGenerator();
63
  }
64
 
65
- throw new InvalidArgumentException('The pseudo random string generator must be set to "mcrypt", "openssl", or "urandom", or be an instance of Facebook\PseudoRandomString\PseudoRandomStringGeneratorInterface');
66
  }
67
 
68
  /**
@@ -74,8 +77,13 @@ class PseudoRandomStringGeneratorFactory
74
  */
75
  private static function detectDefaultPseudoRandomStringGenerator()
76
  {
 
 
 
 
 
77
  // Since openssl_random_pseudo_bytes() can sometimes return non-cryptographically
78
- // secure pseudo-random strings (in rare cases), we check for mcrypt_create_iv() first.
79
  if (function_exists('mcrypt_create_iv')) {
80
  return new McryptPseudoRandomStringGenerator();
81
  }
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
38
  *
39
  * @param PseudoRandomStringGeneratorInterface|string|null $generator
40
  *
41
+ * @throws InvalidArgumentException If the pseudo random string generator must be set to "random_bytes", "mcrypt", "openssl", or "urandom", or be an instance of Facebook\PseudoRandomString\PseudoRandomStringGeneratorInterface.
42
  *
43
  * @return PseudoRandomStringGeneratorInterface
44
  */
52
  return $generator;
53
  }
54
 
55
+ if ('random_bytes' === $generator) {
56
+ return new RandomBytesPseudoRandomStringGenerator();
57
+ }
58
  if ('mcrypt' === $generator) {
59
  return new McryptPseudoRandomStringGenerator();
60
  }
65
  return new UrandomPseudoRandomStringGenerator();
66
  }
67
 
68
+ throw new InvalidArgumentException('The pseudo random string generator must be set to "random_bytes", "mcrypt", "openssl", or "urandom", or be an instance of Facebook\PseudoRandomString\PseudoRandomStringGeneratorInterface');
69
  }
70
 
71
  /**
77
  */
78
  private static function detectDefaultPseudoRandomStringGenerator()
79
  {
80
+ // Check for PHP 7's CSPRNG first to keep mcrypt deprecation messages from appearing in PHP 7.1.
81
+ if (function_exists('random_bytes')) {
82
+ return new RandomBytesPseudoRandomStringGenerator();
83
+ }
84
+
85
  // Since openssl_random_pseudo_bytes() can sometimes return non-cryptographically
86
+ // secure pseudo-random strings (in rare cases), we check for mcrypt_create_iv() next.
87
  if (function_exists('mcrypt_create_iv')) {
88
  return new McryptPseudoRandomStringGenerator();
89
  }
{api → vendor/facebook/graph-sdk/src}/Facebook/PseudoRandomString/PseudoRandomStringGeneratorInterface.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/PseudoRandomString/PseudoRandomStringGeneratorTrait.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
vendor/facebook/graph-sdk/src/Facebook/PseudoRandomString/RandomBytesPseudoRandomStringGenerator.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright 2017 Facebook, Inc.
4
+ *
5
+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
+ * use, copy, modify, and distribute this software in source code or binary
7
+ * form for use in connection with the web services and APIs provided by
8
+ * Facebook.
9
+ *
10
+ * As with any software that integrates with the Facebook platform, your use
11
+ * of this software is subject to the Facebook Developer Principles and
12
+ * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
+ * shall be included in all copies or substantial portions of the software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
+ * DEALINGS IN THE SOFTWARE.
22
+ *
23
+ */
24
+ namespace Facebook\PseudoRandomString;
25
+
26
+ use Facebook\Exceptions\FacebookSDKException;
27
+
28
+ class RandomBytesPseudoRandomStringGenerator implements PseudoRandomStringGeneratorInterface
29
+ {
30
+ use PseudoRandomStringGeneratorTrait;
31
+
32
+ /**
33
+ * @const string The error message when generating the string fails.
34
+ */
35
+ const ERROR_MESSAGE = 'Unable to generate a cryptographically secure pseudo-random string from random_bytes(). ';
36
+
37
+ /**
38
+ * @throws FacebookSDKException
39
+ */
40
+ public function __construct()
41
+ {
42
+ if (!function_exists('random_bytes')) {
43
+ throw new FacebookSDKException(
44
+ static::ERROR_MESSAGE .
45
+ 'The function random_bytes() does not exist.'
46
+ );
47
+ }
48
+ }
49
+
50
+ /**
51
+ * @inheritdoc
52
+ */
53
+ public function getPseudoRandomString($length)
54
+ {
55
+ $this->validateLength($length);
56
+
57
+ return $this->binToHex(random_bytes($length), $length);
58
+ }
59
+ }
{api → vendor/facebook/graph-sdk/src}/Facebook/PseudoRandomString/UrandomPseudoRandomStringGenerator.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/SignedRequest.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
@@ -164,7 +164,7 @@ class SignedRequest
164
  /**
165
  * Splits a raw signed request into signature and payload.
166
  *
167
- * @returns array
168
  *
169
  * @throws FacebookSDKException
170
  */
@@ -182,7 +182,7 @@ class SignedRequest
182
  *
183
  * @param string $encodedSig
184
  *
185
- * @returns string
186
  *
187
  * @throws FacebookSDKException
188
  */
@@ -202,7 +202,7 @@ class SignedRequest
202
  *
203
  * @param string $encodedPayload
204
  *
205
- * @returns array
206
  *
207
  * @throws FacebookSDKException
208
  */
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
164
  /**
165
  * Splits a raw signed request into signature and payload.
166
  *
167
+ * @return array
168
  *
169
  * @throws FacebookSDKException
170
  */
182
  *
183
  * @param string $encodedSig
184
  *
185
+ * @return string
186
  *
187
  * @throws FacebookSDKException
188
  */
202
  *
203
  * @param string $encodedPayload
204
  *
205
+ * @return array
206
  *
207
  * @throws FacebookSDKException
208
  */
{api → vendor/facebook/graph-sdk/src}/Facebook/Url/FacebookUrlDetectionHandler.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
@@ -95,7 +95,8 @@ class FacebookUrlDetectionHandler implements UrlDetectionInterface
95
  protected function getHostName()
96
  {
97
  // Check for proxy first
98
- if ($header = $this->getHeader('X_FORWARDED_HOST') && $this->isValidForwardedHost($header)) {
 
99
  $elements = explode(',', $header);
100
  $host = $elements[count($elements) - 1];
101
  } elseif (!$host = $this->getHeader('HOST')) {
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
95
  protected function getHostName()
96
  {
97
  // Check for proxy first
98
+ $header = $this->getHeader('X_FORWARDED_HOST');
99
+ if ($header && $this->isValidForwardedHost($header)) {
100
  $elements = explode(',', $header);
101
  $host = $elements[count($elements) - 1];
102
  } elseif (!$host = $this->getHeader('HOST')) {
{api → vendor/facebook/graph-sdk/src}/Facebook/Url/FacebookUrlManipulator.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/Url/UrlDetectionInterface.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
{api → vendor/facebook/graph-sdk/src}/Facebook/autoload.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
@@ -32,6 +32,8 @@ if (version_compare(PHP_VERSION, '5.4.0', '<')) {
32
  throw new Exception('The Facebook SDK requires PHP version 5.4 or higher.');
33
  }
34
 
 
 
35
  /**
36
  * Register the autoloader for the Facebook SDK classes.
37
  *
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
32
  throw new Exception('The Facebook SDK requires PHP version 5.4 or higher.');
33
  }
34
 
35
+ require_once __DIR__ . '/polyfills.php';
36
+
37
  /**
38
  * Register the autoloader for the Facebook SDK classes.
39
  *
{api → vendor/facebook/graph-sdk/src}/Facebook/polyfills.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Copyright 2016 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
1
  <?php
2
  /**
3
+ * Copyright 2017 Facebook, Inc.
4
  *
5
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
  * use, copy, modify, and distribute this software in source code or binary
xyz-functions.php CHANGED
@@ -225,19 +225,14 @@ function xyz_fbap_is_session_started()
225
 
226
 
227
 
228
- if(!function_exists('xyz_fbap_post_to_facebook'))
229
- { function xyz_fbap_post_to_facebook($post_details) {
230
  if (function_exists('curl_init'))
231
  {
232
- $url=XYZ_SMAP_SOLUTION_PUBLISH_URL.'api/facebook.php';
233
- $header_array = array();
234
- $header_array[]='X-SMAP-AUTH-KEY: '.$post_details['xyz_smap_secret_key'];
235
  $post_parameters['post_params'] = serialize($post_details);
236
- $post_parameters['request_hash'] = md5($post_parameters['post_params'].$post_details['xyz_smap_secret_key']);
237
-
238
  $ch = curl_init();
239
  curl_setopt($ch, CURLOPT_URL, $url);
240
- curl_setopt($ch, CURLOPT_HTTPHEADER, $header_array);
241
  curl_setopt($ch, CURLOPT_POST, true);
242
  curl_setopt($ch, CURLOPT_POSTFIELDS, $post_parameters);
243
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
225
 
226
 
227
 
228
+ if(!function_exists('xyz_fbap_post_to_smap_api'))
229
+ { function xyz_fbap_post_to_smap_api($post_details,$url,$xyzscripts_hash_val='') {
230
  if (function_exists('curl_init'))
231
  {
 
 
 
232
  $post_parameters['post_params'] = serialize($post_details);
233
+ $post_parameters['request_hash'] = md5($post_parameters['post_params'].$xyzscripts_hash_val);
 
234
  $ch = curl_init();
235
  curl_setopt($ch, CURLOPT_URL, $url);
 
236
  curl_setopt($ch, CURLOPT_POST, true);
237
  curl_setopt($ch, CURLOPT_POSTFIELDS, $post_parameters);
238
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);