Ver Fonte

#542 Facebook lib from 5.2.0 to 5.4.4

Alex Trofimov há 9 anos atrás
pai
commit
7ed6730bef
76 ficheiros alterados com 200 adições e 88 exclusões
  1. 1 1
      plugins/facebook-php-sdk/src/Facebook/Authentication/AccessToken.php
  2. 1 1
      plugins/facebook-php-sdk/src/Facebook/Authentication/AccessTokenMetadata.php
  3. 1 1
      plugins/facebook-php-sdk/src/Facebook/Authentication/OAuth2Client.php
  4. 1 1
      plugins/facebook-php-sdk/src/Facebook/Exceptions/FacebookAuthenticationException.php
  5. 1 1
      plugins/facebook-php-sdk/src/Facebook/Exceptions/FacebookAuthorizationException.php
  6. 1 1
      plugins/facebook-php-sdk/src/Facebook/Exceptions/FacebookClientException.php
  7. 1 1
      plugins/facebook-php-sdk/src/Facebook/Exceptions/FacebookOtherException.php
  8. 1 1
      plugins/facebook-php-sdk/src/Facebook/Exceptions/FacebookResponseException.php
  9. 1 1
      plugins/facebook-php-sdk/src/Facebook/Exceptions/FacebookResumableUploadException.php
  10. 1 1
      plugins/facebook-php-sdk/src/Facebook/Exceptions/FacebookSDKException.php
  11. 1 1
      plugins/facebook-php-sdk/src/Facebook/Exceptions/FacebookServerException.php
  12. 1 1
      plugins/facebook-php-sdk/src/Facebook/Exceptions/FacebookThrottleException.php
  13. 3 3
      plugins/facebook-php-sdk/src/Facebook/Facebook.php
  14. 1 1
      plugins/facebook-php-sdk/src/Facebook/FacebookApp.php
  15. 1 3
      plugins/facebook-php-sdk/src/Facebook/FacebookBatchRequest.php
  16. 1 1
      plugins/facebook-php-sdk/src/Facebook/FacebookBatchResponse.php
  17. 1 1
      plugins/facebook-php-sdk/src/Facebook/FacebookClient.php
  18. 1 1
      plugins/facebook-php-sdk/src/Facebook/FacebookRequest.php
  19. 2 2
      plugins/facebook-php-sdk/src/Facebook/FacebookResponse.php
  20. 1 1
      plugins/facebook-php-sdk/src/Facebook/FileUpload/FacebookFile.php
  21. 1 1
      plugins/facebook-php-sdk/src/Facebook/FileUpload/FacebookResumableUploader.php
  22. 1 1
      plugins/facebook-php-sdk/src/Facebook/FileUpload/FacebookTransferChunk.php
  23. 1 1
      plugins/facebook-php-sdk/src/Facebook/FileUpload/FacebookVideo.php
  24. 2 1
      plugins/facebook-php-sdk/src/Facebook/FileUpload/Mimetypes.php
  25. 1 1
      plugins/facebook-php-sdk/src/Facebook/GraphNodes/Birthday.php
  26. 1 1
      plugins/facebook-php-sdk/src/Facebook/GraphNodes/Collection.php
  27. 1 2
      plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphAchievement.php
  28. 1 1
      plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphAlbum.php
  29. 1 1
      plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphApplication.php
  30. 1 1
      plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphCoverPhoto.php
  31. 15 1
      plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphEdge.php
  32. 1 1
      plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphEvent.php
  33. 1 1
      plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphGroup.php
  34. 1 1
      plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphList.php
  35. 1 1
      plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphLocation.php
  36. 1 1
      plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphNode.php
  37. 1 1
      plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphNodeFactory.php
  38. 1 1
      plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphObject.php
  39. 1 1
      plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphObjectFactory.php
  40. 23 1
      plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphPage.php
  41. 1 1
      plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphPicture.php
  42. 1 1
      plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphSessionInfo.php
  43. 1 1
      plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphUser.php
  44. 1 1
      plugins/facebook-php-sdk/src/Facebook/Helpers/FacebookCanvasHelper.php
  45. 1 1
      plugins/facebook-php-sdk/src/Facebook/Helpers/FacebookJavaScriptHelper.php
  46. 1 1
      plugins/facebook-php-sdk/src/Facebook/Helpers/FacebookPageTabHelper.php
  47. 11 2
      plugins/facebook-php-sdk/src/Facebook/Helpers/FacebookRedirectLoginHelper.php
  48. 1 1
      plugins/facebook-php-sdk/src/Facebook/Helpers/FacebookSignedRequestFromInputHelper.php
  49. 2 2
      plugins/facebook-php-sdk/src/Facebook/Http/GraphRawResponse.php
  50. 1 1
      plugins/facebook-php-sdk/src/Facebook/Http/RequestBodyInterface.php
  51. 1 1
      plugins/facebook-php-sdk/src/Facebook/Http/RequestBodyMultipart.php
  52. 1 1
      plugins/facebook-php-sdk/src/Facebook/Http/RequestBodyUrlEncoded.php
  53. 1 1
      plugins/facebook-php-sdk/src/Facebook/HttpClients/FacebookCurl.php
  54. 1 1
      plugins/facebook-php-sdk/src/Facebook/HttpClients/FacebookCurlHttpClient.php
  55. 1 1
      plugins/facebook-php-sdk/src/Facebook/HttpClients/FacebookGuzzleHttpClient.php
  56. 1 1
      plugins/facebook-php-sdk/src/Facebook/HttpClients/FacebookHttpClientInterface.php
  57. 1 1
      plugins/facebook-php-sdk/src/Facebook/HttpClients/FacebookStream.php
  58. 1 1
      plugins/facebook-php-sdk/src/Facebook/HttpClients/FacebookStreamHttpClient.php
  59. 1 1
      plugins/facebook-php-sdk/src/Facebook/HttpClients/HttpClientsFactory.php
  60. 1 1
      plugins/facebook-php-sdk/src/Facebook/PersistentData/FacebookMemoryPersistentDataHandler.php
  61. 1 1
      plugins/facebook-php-sdk/src/Facebook/PersistentData/FacebookSessionPersistentDataHandler.php
  62. 1 1
      plugins/facebook-php-sdk/src/Facebook/PersistentData/PersistentDataFactory.php
  63. 1 1
      plugins/facebook-php-sdk/src/Facebook/PersistentData/PersistentDataInterface.php
  64. 1 1
      plugins/facebook-php-sdk/src/Facebook/PseudoRandomString/McryptPseudoRandomStringGenerator.php
  65. 1 1
      plugins/facebook-php-sdk/src/Facebook/PseudoRandomString/OpenSslPseudoRandomStringGenerator.php
  66. 12 4
      plugins/facebook-php-sdk/src/Facebook/PseudoRandomString/PseudoRandomStringGeneratorFactory.php
  67. 1 1
      plugins/facebook-php-sdk/src/Facebook/PseudoRandomString/PseudoRandomStringGeneratorInterface.php
  68. 1 2
      plugins/facebook-php-sdk/src/Facebook/PseudoRandomString/PseudoRandomStringGeneratorTrait.php
  69. 59 0
      plugins/facebook-php-sdk/src/Facebook/PseudoRandomString/RandomBytesPseudoRandomStringGenerator.php
  70. 1 1
      plugins/facebook-php-sdk/src/Facebook/PseudoRandomString/UrandomPseudoRandomStringGenerator.php
  71. 1 1
      plugins/facebook-php-sdk/src/Facebook/SignedRequest.php
  72. 3 2
      plugins/facebook-php-sdk/src/Facebook/Url/FacebookUrlDetectionHandler.php
  73. 1 1
      plugins/facebook-php-sdk/src/Facebook/Url/FacebookUrlManipulator.php
  74. 1 1
      plugins/facebook-php-sdk/src/Facebook/Url/UrlDetectionInterface.php
  75. 3 1
      plugins/facebook-php-sdk/src/Facebook/autoload.php
  76. 1 1
      plugins/facebook-php-sdk/src/Facebook/polyfills.php

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/Authentication/AccessToken.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/Authentication/AccessTokenMetadata.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/Authentication/OAuth2Client.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/Exceptions/FacebookAuthenticationException.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/Exceptions/FacebookAuthorizationException.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/Exceptions/FacebookClientException.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/Exceptions/FacebookOtherException.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/Exceptions/FacebookResponseException.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/Exceptions/FacebookResumableUploadException.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/Exceptions/FacebookSDKException.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/Exceptions/FacebookServerException.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/Exceptions/FacebookThrottleException.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 3 - 3
plugins/facebook-php-sdk/src/Facebook/Facebook.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary
@@ -53,12 +53,12 @@ class Facebook
     /**
      * @const string Version number of the Facebook PHP SDK.
      */
-    const VERSION = '5.2.0';
+    const VERSION = '5.4.4';
 
     /**
      * @const string Default Graph API version for requests.
      */
-    const DEFAULT_GRAPH_VERSION = 'v2.6';
+    const DEFAULT_GRAPH_VERSION = 'v2.8';
 
     /**
      * @const string The name of the environment variable that contains the app ID.

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/FacebookApp.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 3
plugins/facebook-php-sdk/src/Facebook/FacebookBatchRequest.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary
@@ -168,8 +168,6 @@ class FacebookBatchRequest extends FacebookRequest implements IteratorAggregate,
 
     /**
      * Prepares the requests to be sent as a batch request.
-     *
-     * @return string
      */
     public function prepareRequestsForBatch()
     {

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/FacebookBatchResponse.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/FacebookClient.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/FacebookRequest.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 2 - 2
plugins/facebook-php-sdk/src/Facebook/FacebookResponse.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary
@@ -213,7 +213,7 @@ class FacebookResponse
     /**
      * Returns the exception that was thrown for this request.
      *
-     * @return FacebookSDKException|null
+     * @return FacebookResponseException|null
      */
     public function getThrownException()
     {

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/FileUpload/FacebookFile.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/FileUpload/FacebookResumableUploader.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/FileUpload/FacebookTransferChunk.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/FileUpload/FacebookVideo.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 2 - 1
plugins/facebook-php-sdk/src/Facebook/FileUpload/Mimetypes.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary
@@ -724,6 +724,7 @@ class Mimetypes
         'spq' => 'application/scvp-vp-request',
         'spx' => 'audio/ogg',
         'src' => 'application/x-wais-source',
+        'srt' => 'application/octet-stream',
         'sru' => 'application/sru+xml',
         'srx' => 'application/sparql-results+xml',
         'sse' => 'application/vnd.kodak-descriptor',

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/GraphNodes/Birthday.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/GraphNodes/Collection.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 2
plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphAchievement.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary
@@ -28,7 +28,6 @@ namespace Facebook\GraphNodes;
  *
  * @package Facebook
  */
-
 class GraphAchievement extends GraphNode
 {
     /**

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphAlbum.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphApplication.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphCoverPhoto.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 15 - 1
plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphEdge.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary
@@ -235,4 +235,18 @@ class GraphEdge extends Collection
 
         return null;
     }
+
+    /**
+     * @inheritDoc
+     */
+    public function map(\Closure $callback)
+    {
+        return new static(
+            $this->request,
+            array_map($callback, $this->items, array_keys($this->items)),
+            $this->metaData,
+            $this->parentEdgeEndpoint,
+            $this->subclassName
+        );
+    }
 }

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphEvent.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphGroup.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphList.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphLocation.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphNode.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphNodeFactory.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphObject.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphObjectFactory.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 23 - 1
plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphPage.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary
@@ -37,6 +37,8 @@ class GraphPage extends GraphNode
         'best_page' => '\Facebook\GraphNodes\GraphPage',
         'global_brand_parent_page' => '\Facebook\GraphNodes\GraphPage',
         'location' => '\Facebook\GraphNodes\GraphLocation',
+        'cover' => '\Facebook\GraphNodes\GraphCoverPhoto',
+        'picture' => '\Facebook\GraphNodes\GraphPicture',
     ];
 
     /**
@@ -99,6 +101,26 @@ class GraphPage extends GraphNode
         return $this->getField('location');
     }
 
+    /**
+     * Returns CoverPhoto of the Page.
+     *
+     * @return GraphCoverPhoto|null
+     */
+    public function getCover()
+    {
+        return $this->getField('cover');
+    }
+
+    /**
+     * Returns Picture of the Page.
+     *
+     * @return GraphPicture|null
+     */
+    public function getPicture()
+    {
+        return $this->getField('picture');
+    }
+
     /**
      * Returns the page access token for the admin user.
      *

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphPicture.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphSessionInfo.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/GraphNodes/GraphUser.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/Helpers/FacebookCanvasHelper.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/Helpers/FacebookJavaScriptHelper.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/Helpers/FacebookPageTabHelper.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 11 - 2
plugins/facebook-php-sdk/src/Facebook/Helpers/FacebookRedirectLoginHelper.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary
@@ -122,7 +122,7 @@ class FacebookRedirectLoginHelper
      */
     private function makeUrl($redirectUrl, array $scope, array $params = [], $separator = '&')
     {
-        $state = $this->pseudoRandomStringGenerator->getPseudoRandomString(static::CSRF_LENGTH);
+        $state = $this->persistentDataHandler->get('state') ?: $this->pseudoRandomStringGenerator->getPseudoRandomString(static::CSRF_LENGTH);
         $this->persistentDataHandler->set('state', $state);
 
         return $this->oAuth2Client->getAuthorizationUrl($redirectUrl, $state, $scope, $params, $separator);
@@ -219,6 +219,7 @@ class FacebookRedirectLoginHelper
         }
 
         $this->validateCsrf();
+        $this->resetCsrf();
 
         $redirectUrl = $redirectUrl ?: $this->urlDetectionHandler->getCurrentUrl();
         // At minimum we need to remove the state param
@@ -250,6 +251,14 @@ class FacebookRedirectLoginHelper
         throw new FacebookSDKException('Cross-site request forgery validation failed. The "state" param from the URL and session do not match.');
     }
 
+    /**
+     * Resets the CSRF so that it doesn't get reused.
+     */
+    private function resetCsrf()
+    {
+        $this->persistentDataHandler->set('state', null);
+    }
+
     /**
      * Return the code.
      *

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/Helpers/FacebookSignedRequestFromInputHelper.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 2 - 2
plugins/facebook-php-sdk/src/Facebook/Http/GraphRawResponse.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary
@@ -129,7 +129,7 @@ class GraphRawResponse
             if (strpos($line, ': ') === false) {
                 $this->setHttpResponseCodeFromHeader($line);
             } else {
-                list($key, $value) = explode(': ', $line);
+                list($key, $value) = explode(': ', $line, 2);
                 $this->headers[$key] = $value;
             }
         }

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/Http/RequestBodyInterface.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/Http/RequestBodyMultipart.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/Http/RequestBodyUrlEncoded.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/HttpClients/FacebookCurl.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/HttpClients/FacebookCurlHttpClient.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/HttpClients/FacebookGuzzleHttpClient.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/HttpClients/FacebookHttpClientInterface.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/HttpClients/FacebookStream.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/HttpClients/FacebookStreamHttpClient.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/HttpClients/HttpClientsFactory.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/PersistentData/FacebookMemoryPersistentDataHandler.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/PersistentData/FacebookSessionPersistentDataHandler.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/PersistentData/PersistentDataFactory.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/PersistentData/PersistentDataInterface.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/PseudoRandomString/McryptPseudoRandomStringGenerator.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/PseudoRandomString/OpenSslPseudoRandomStringGenerator.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 12 - 4
plugins/facebook-php-sdk/src/Facebook/PseudoRandomString/PseudoRandomStringGeneratorFactory.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary
@@ -38,7 +38,7 @@ class PseudoRandomStringGeneratorFactory
      *
      * @param PseudoRandomStringGeneratorInterface|string|null $generator
      *
-     * @throws InvalidArgumentException If the pseudo random string generator must be set to "mcrypt", "openssl", or "urandom", or be an instance of Facebook\PseudoRandomString\PseudoRandomStringGeneratorInterface.
+     * @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.
      *
      * @return PseudoRandomStringGeneratorInterface
      */
@@ -52,6 +52,9 @@ class PseudoRandomStringGeneratorFactory
             return $generator;
         }
 
+        if ('random_bytes' === $generator) {
+            return new RandomBytesPseudoRandomStringGenerator();
+        }
         if ('mcrypt' === $generator) {
             return new McryptPseudoRandomStringGenerator();
         }
@@ -62,7 +65,7 @@ class PseudoRandomStringGeneratorFactory
             return new UrandomPseudoRandomStringGenerator();
         }
 
-        throw new InvalidArgumentException('The pseudo random string generator must be set to "mcrypt", "openssl", or "urandom", or be an instance of Facebook\PseudoRandomString\PseudoRandomStringGeneratorInterface');
+        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');
     }
 
     /**
@@ -74,8 +77,13 @@ class PseudoRandomStringGeneratorFactory
      */
     private static function detectDefaultPseudoRandomStringGenerator()
     {
+        // Check for PHP 7's CSPRNG first to keep mcrypt deprecation messages from appearing in PHP 7.1.
+        if (function_exists('random_bytes')) {
+            return new RandomBytesPseudoRandomStringGenerator();
+        }
+
         // Since openssl_random_pseudo_bytes() can sometimes return non-cryptographically
-        // secure pseudo-random strings (in rare cases), we check for mcrypt_create_iv() first.
+        // secure pseudo-random strings (in rare cases), we check for mcrypt_create_iv() next.
         if (function_exists('mcrypt_create_iv')) {
             return new McryptPseudoRandomStringGenerator();
         }

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/PseudoRandomString/PseudoRandomStringGeneratorInterface.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 2
plugins/facebook-php-sdk/src/Facebook/PseudoRandomString/PseudoRandomStringGeneratorTrait.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary
@@ -48,7 +48,6 @@ trait PseudoRandomStringGeneratorTrait
      *
      * @param string $binaryData The binary data to convert to hex.
      * @param int    $length     The length of the string to return.
-     * @throws \RuntimeException Throws an exception when multibyte support is not enabled
      *
      * @return string
      */

+ 59 - 0
plugins/facebook-php-sdk/src/Facebook/PseudoRandomString/RandomBytesPseudoRandomStringGenerator.php

@@ -0,0 +1,59 @@
+<?php
+/**
+ * Copyright 2017 Facebook, Inc.
+ *
+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to
+ * use, copy, modify, and distribute this software in source code or binary
+ * form for use in connection with the web services and APIs provided by
+ * Facebook.
+ *
+ * As with any software that integrates with the Facebook platform, your use
+ * of this software is subject to the Facebook Developer Principles and
+ * Policies [http://developers.facebook.com/policy/]. This copyright notice
+ * shall be included in all copies or substantial portions of the software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+namespace Facebook\PseudoRandomString;
+
+use Facebook\Exceptions\FacebookSDKException;
+
+class RandomBytesPseudoRandomStringGenerator implements PseudoRandomStringGeneratorInterface
+{
+    use PseudoRandomStringGeneratorTrait;
+
+    /**
+     * @const string The error message when generating the string fails.
+     */
+    const ERROR_MESSAGE = 'Unable to generate a cryptographically secure pseudo-random string from random_bytes(). ';
+
+    /**
+     * @throws FacebookSDKException
+     */
+    public function __construct()
+    {
+        if (!function_exists('random_bytes')) {
+            throw new FacebookSDKException(
+                static::ERROR_MESSAGE .
+                'The function random_bytes() does not exist.'
+            );
+        }
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function getPseudoRandomString($length)
+    {
+        $this->validateLength($length);
+
+        return $this->binToHex(random_bytes($length), $length);
+    }
+}

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/PseudoRandomString/UrandomPseudoRandomStringGenerator.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/SignedRequest.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 3 - 2
plugins/facebook-php-sdk/src/Facebook/Url/FacebookUrlDetectionHandler.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary
@@ -95,7 +95,8 @@ class FacebookUrlDetectionHandler implements UrlDetectionInterface
     protected function getHostName()
     {
         // Check for proxy first
-        if ($header = $this->getHeader('X_FORWARDED_HOST') && $this->isValidForwardedHost($header)) {
+        $header = $this->getHeader('X_FORWARDED_HOST');
+        if ($header && $this->isValidForwardedHost($header)) {
             $elements = explode(',', $header);
             $host = $elements[count($elements) - 1];
         } elseif (!$host = $this->getHeader('HOST')) {

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/Url/FacebookUrlManipulator.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/Url/UrlDetectionInterface.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary

+ 3 - 1
plugins/facebook-php-sdk/src/Facebook/autoload.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary
@@ -32,6 +32,8 @@ if (version_compare(PHP_VERSION, '5.4.0', '<')) {
     throw new Exception('The Facebook SDK requires PHP version 5.4 or higher.');
 }
 
+require_once __DIR__ . '/polyfills.php';
+
 /**
  * Register the autoloader for the Facebook SDK classes.
  *

+ 1 - 1
plugins/facebook-php-sdk/src/Facebook/polyfills.php

@@ -1,6 +1,6 @@
 <?php
 /**
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * You are hereby granted a non-exclusive, worldwide, royalty-free license to
  * use, copy, modify, and distribute this software in source code or binary