private function TwitterAPIExchange::buildBaseString in Twitter Profile Widget 8.2
Same name and namespace in other branches
- 8 src/Resources/j7mbo/twitter_api_php/TwitterAPIExchange.php \Drupal\twitter_profile_widget\Resources\j7mbo\twitter_api_php\TwitterAPIExchange::buildBaseString()
Private method to generate the base string used by cURL
Parameters
string $baseURI:
string $method:
array $params:
Return value
string Built base string
1 call to TwitterAPIExchange::buildBaseString()
- TwitterAPIExchange::buildOauth in src/
Resources/ j7mbo/ twitter_api_php/ TwitterAPIExchange.php - Build the Oauth object using params set in construct and additionals passed to this method. For v1.1, see: https://dev.twitter.com/docs/api/1.1
File
- src/
Resources/ j7mbo/ twitter_api_php/ TwitterAPIExchange.php, line 332
Class
- TwitterAPIExchange
- Twitter-API-PHP : Simple PHP wrapper for the v1.1 API
Namespace
Drupal\twitter_profile_widget\Resources\j7mbo\twitter_api_phpCode
private function buildBaseString($baseURI, $method, $params) {
$return = [];
ksort($params);
foreach ($params as $key => $value) {
$return[] = rawurlencode($key) . '=' . rawurlencode($value);
}
return $method . "&" . rawurlencode($baseURI) . '&' . rawurlencode(implode('&', $return));
}