Skip to content

Commit d52a946

Browse files
added fw_ext_social_facebook_graph_api_explorer() to access Facebook Graph API
1 parent f6c7286 commit d52a946

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php if ( ! defined( 'FW' ) ) {
2+
die( 'Forbidden' );
3+
}
4+
5+
/**
6+
* Accessing Facebook Graph API
7+
*
8+
* @param string $method
9+
* @param $node
10+
* @param $args
11+
* @param bool $token
12+
* @param string $version
13+
* @param string $graph_url
14+
*
15+
* @return string
16+
*/
17+
function fw_ext_social_facebook_graph_api_explorer( $method = 'GET', $node, $args, $token = false, $version = 'v2.2', $graph_url = 'https://graph.facebook.com' ) {
18+
/* @var FW_Extension_Social_Facebook $facebook */
19+
$facebook = fw()->extensions->get( 'social-facebook' );
20+
21+
return $facebook->graph_api_explorer( $method, $node, $args, $token, $version, $graph_url );
22+
}

manifest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66

77
$manifest['name'] = __( 'Social', 'fw' );
88
$manifest['description'] = __( 'Use this extension to configure all your social related APIs. Other extensions will use the Social extension to connect to your social accounts.', 'fw' );
9-
$manifest['version'] = '1.0.0';
9+
$manifest['version'] = '1.0.1';
1010
$manifest['display'] = true;
1111
$manifest['standalone'] = true;

0 commit comments

Comments
 (0)