1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
5
|
|
|
interface SocialIntegrationAPIInterface |
|
|
|
|
6
|
|
|
{ |
7
|
|
|
|
8
|
|
|
|
9
|
|
|
//======================================= STATIC METHODS =============================================== |
10
|
|
|
|
11
|
|
|
/** |
12
|
|
|
* Maximum number of followers/friends that can be retrieved |
13
|
|
|
* @var Int |
14
|
|
|
*/ |
15
|
|
|
public static function set_number_of_friends_that_can_be_retrieved($n); |
|
|
|
|
16
|
|
|
public static function get_number_of_friends_that_can_be_retrieved(); |
|
|
|
|
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* Link to login form |
20
|
|
|
* @param String $returnURL |
21
|
|
|
* @return String |
22
|
|
|
*/ |
23
|
|
|
public static function login_url($returnURL = ""); |
24
|
|
|
|
25
|
|
|
|
26
|
|
|
/** |
27
|
|
|
* Link to connect |
28
|
|
|
* @param String $returnURL |
29
|
|
|
* @return String |
30
|
|
|
*/ |
31
|
|
|
public static function connect_url($returnURL = "", $existingMember = false); |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* redirects to login prompt, lets the user log in and returns to |
35
|
|
|
* the returnURL specified. |
36
|
|
|
* @param String $returnURL |
37
|
|
|
* @return REDIRECTS! |
|
|
|
|
38
|
|
|
*/ |
39
|
|
|
public static function redirect_to_login_prompt($returnURL = ""); |
40
|
|
|
|
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* returns all the data of the currently logged in / connected user. |
44
|
|
|
* |
45
|
|
|
* @return Array | Null |
46
|
|
|
*/ |
47
|
|
|
public static function get_current_user(); |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* gets a list of friends |
51
|
|
|
* @param Int - $Limit, set to -1 to to maximum |
52
|
|
|
* @param String - $searchString, filter for search string |
53
|
|
|
* @return Array |
54
|
|
|
*/ |
55
|
|
|
public static function get_list_of_friends($limit = 12, $searchString = ""); |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* Checks if the id provided is a valid member of the class. |
59
|
|
|
* @return Boolean |
60
|
|
|
*/ |
61
|
|
|
public static function is_valid_user($id); |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* return last status updates |
65
|
|
|
* @return Boolean |
66
|
|
|
*/ |
67
|
|
|
public static function get_updates($lastNumber = 12); |
68
|
|
|
|
69
|
|
|
/** |
70
|
|
|
* make sure to return TRUE as response if the message is sent |
71
|
|
|
* successfully |
72
|
|
|
* Sends a message from the current user to someone else in the networkd |
73
|
|
|
* @param Int $userID - Facebook user id. |
|
|
|
|
74
|
|
|
* @param String $message - Message you are sending |
75
|
|
|
* @param String $link - Link to send with message |
76
|
|
|
* @return Boolean - return TRUE as success |
77
|
|
|
*/ |
78
|
|
|
public static function send_message($to, $message, $link = "", $otherVariables = array()); |
79
|
|
|
|
80
|
|
|
|
81
|
|
|
public function test($request); |
|
|
|
|
82
|
|
|
|
83
|
|
|
public function meondatabase(); |
|
|
|
|
84
|
|
|
} |
85
|
|
|
|
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.