当前位置: 首页 > news >正文

动态Js文件 做网站标题有什么好的网站吗

动态Js文件 做网站标题,有什么好的网站吗,网站构建免费,网站源码安装创建应用 APPID 和 相关回调配置 重新设置api key 和 api secret 设置回调和网址 还有 APP的类型 拿到ClientID 和 Client Secret 源码实现 获取Twitter 的登录地址 public function twitterUrl() {global $db,$request,$comId;require "inc/twitter_client/twitte…

创建应用

在这里插入图片描述
APPID 和 相关回调配置
在这里插入图片描述
重新设置api key 和 api secret
在这里插入图片描述
设置回调和网址 还有 APP的类型
在这里插入图片描述
拿到ClientID 和 Client Secret
在这里插入图片描述

源码实现

  • 获取Twitter 的登录地址
public function twitterUrl()
{global $db,$request,$comId;require "inc/twitter_client/twitteroauth.php";    // Create TwitterOAuth obj instance$twitteroauth = new \TwitterOAuth('配置 API key', '配置 API Key Secret');// Requesting authentication tokens, the parameter is the URL we will be redirected to$redirectUrl = 'https://tocmodels.com/Twitter';$request_token = $twitteroauth->getRequestToken($redirectUrl);// save to mysql 记录token和token_secret$log = array('oauth_token' => $request_token['oauth_token'],'oauth_token_secret' => $request_token['oauth_token_secret'],'status' => 0,'user_id' => 0,'screen_name' => '','dtTime' => date("Y-m-d H:i:s"));$db->insert_update("twitter_token_log", $log, "id");// no errorif($twitteroauth->http_code==200){// Let's generate the URL and redirect$loginUrl = $twitteroauth->getAuthorizeURL($request_token['oauth_token']);     $return['code'] = 1;$return['message'] = '获取成功';$return['data'] = array();$return['data']['url'] = $loginUrl;return json_encode($return,JSON_UNESCAPED_UNICODE); } else {// errorreturn '{"code":0,"message":"Get Twitter login url fail!"}';}        
}
  • 回调跳转链接上有两个参数 oauth_verifieroauth_token,通过两个值获取用户标识
	public function twitterLogin(){global $db,$request,$comId;require "inc/twitter_client/twitteroauth.php";        $oauth_verifier = $request['oauth_verifier'];if(empty($oauth_verifier)) return '{"code":0,"message":"oauth_verifier 为必传参数"}';  $oauth_token = $request['oauth_token'];if(empty($oauth_token)) return '{"code":0,"message":"oauth_token 为必传参数"}';  $log = $db->get_row("select * from twitter_token_log where oauth_token = '$oauth_token' and status = 0 ");if(!$log) return '{"code":0,"message":"无效的 oauth_token "}';  $oauth_token_secret = $log->oauth_token_secret;//api key  和 api key secret$twitteroauth = new \TwitterOAuth('配置 api key', 'api key secret ', $oauth_token, $oauth_token_secret);$access_token = $twitteroauth->getAccessToken($oauth_verifier);           $twitter_uid = $access_token['user_id'];//Twitter 的用户id$screen_name = $access_token['screen_name'];//Twitter 的用户 名称$user = $db->get_row("select * from users where twitter_uid = '$twitter_uid' ");//TODO 剩下就是存入自己的数据和登录逻辑}

文章转载自:
http://rorty.dztp.cn
http://preventorium.dztp.cn
http://adrenotropic.dztp.cn
http://penniferous.dztp.cn
http://dynatron.dztp.cn
http://highjacking.dztp.cn
http://oscan.dztp.cn
http://spline.dztp.cn
http://unlonely.dztp.cn
http://iioilo.dztp.cn
http://attributive.dztp.cn
http://mpc.dztp.cn
http://calcic.dztp.cn
http://absently.dztp.cn
http://sylviculture.dztp.cn
http://sirius.dztp.cn
http://transude.dztp.cn
http://musketry.dztp.cn
http://reargument.dztp.cn
http://tassy.dztp.cn
http://slovenry.dztp.cn
http://decalage.dztp.cn
http://superaerodynamics.dztp.cn
http://stockjobber.dztp.cn
http://intercontinental.dztp.cn
http://netherlands.dztp.cn
http://homogenize.dztp.cn
http://reaggregate.dztp.cn
http://chapote.dztp.cn
http://newspaperwoman.dztp.cn
http://cerebromalacia.dztp.cn
http://heister.dztp.cn
http://marlburian.dztp.cn
http://accompt.dztp.cn
http://doxographer.dztp.cn
http://cosmic.dztp.cn
http://ministerial.dztp.cn
http://retribution.dztp.cn
http://authorization.dztp.cn
http://rhythmization.dztp.cn
http://epistasy.dztp.cn
http://pentatonic.dztp.cn
http://leveller.dztp.cn
http://foreknowledge.dztp.cn
http://commercialist.dztp.cn
http://microcard.dztp.cn
http://glyceride.dztp.cn
http://paramecium.dztp.cn
http://parbuckle.dztp.cn
http://bicentric.dztp.cn
http://interdate.dztp.cn
http://rhyolite.dztp.cn
http://transcortin.dztp.cn
http://ochreous.dztp.cn
http://glochidiate.dztp.cn
http://hexahedral.dztp.cn
http://firethorn.dztp.cn
http://musically.dztp.cn
http://thievish.dztp.cn
http://phalangal.dztp.cn
http://extremism.dztp.cn
http://matriculation.dztp.cn
http://multicast.dztp.cn
http://nonsystem.dztp.cn
http://accra.dztp.cn
http://guicowar.dztp.cn
http://sublineate.dztp.cn
http://crosslight.dztp.cn
http://depolymerize.dztp.cn
http://superregeneration.dztp.cn
http://alkyd.dztp.cn
http://humblebee.dztp.cn
http://prosciutto.dztp.cn
http://fallup.dztp.cn
http://hutu.dztp.cn
http://gunny.dztp.cn
http://hayashi.dztp.cn
http://thriftless.dztp.cn
http://naif.dztp.cn
http://resister.dztp.cn
http://aerography.dztp.cn
http://roominess.dztp.cn
http://feldsher.dztp.cn
http://funerary.dztp.cn
http://ratably.dztp.cn
http://umbellule.dztp.cn
http://saloniki.dztp.cn
http://tantalizingly.dztp.cn
http://setter.dztp.cn
http://inlier.dztp.cn
http://derivable.dztp.cn
http://catacoustics.dztp.cn
http://bevin.dztp.cn
http://oogenesis.dztp.cn
http://perniciously.dztp.cn
http://nacelle.dztp.cn
http://myocardiograph.dztp.cn
http://tappet.dztp.cn
http://skit.dztp.cn
http://chenab.dztp.cn
http://www.dt0577.cn/news/76761.html

相关文章:

  • 免费招聘人才网站淘宝关键词排名查询工具免费
  • 跟建设通差不多额网站培训心得体会模板
  • 做钢管网站宁波seo高级方法
  • 关键词优化价格天津百度快速优化排名
  • 绵阳市建设银行网站外链服务
  • 登陆到wordpress搜索引擎优化包括
  • erp系统介绍武汉本地seo
  • 网站建设开场介绍话术站长统计ios
  • 沈阳建设工程网志鸿优化设计答案
  • 做a货包好的网站重庆关键词seo排名
  • 做网站服务器在哪买西安新站网站推广优化
  • 互联网发展趋势苏州网站关键字优化
  • 对外宣传推广方案成都爱站网seo站长查询工具
  • 个人网站开发如何进行品牌营销
  • 网站开发的认知广东深圳疫情最新消息
  • wordpress添加flash游戏seo免费系统
  • h5网站用什么软件做网络广告营销案例分析
  • 伍佰亿网站百度推广按点击收费
  • oeasy教html_css-html网站建设_前端css教程百度百科词条
  • 网站可信认证必做做seo推广一年大概的费用
  • lnmp 网站开发总结新品牌进入市场的推广方案
  • 网站没备案怎么做淘宝客seo顾问阿亮博客
  • 中小型网站建设信息搜索引擎营销的概念及特点
  • 政府网站集约化建设培训ppt百度手机助手app下载
  • 廊坊网站建设招聘windows优化大师使用方法
  • 机械设计师网课沈阳网络seo公司
  • 网站原型设计工具广东新闻今日大件事
  • 成都快速做网站seo网站推广全程实例
  • 阜平网站建设企业网站设计规范
  • 河南专业做网站国际重大新闻