我正在尝试将twitter应用到我的应用程序中,我只想与深层链接共享.
所以应该没有login必要.
为此,我按照Twitter-Developer-Docs以集成SDK:
https://dev.twitter.com/twitter-kit/android/integrate
他们引导我到https://fabric.io/login?redirect_url=%2Fdownloads下载IDE插件,
但这真的是我需要的吗?它完全免费吗?我不完全理解为什么我需要确认一个新的注册,如果我已经有我的应用程序设置的Twitter帐户.
或者使用非官方Twitter4j-libary以满足我的需求更好?
我认为,我可以通过编程方式将共享功能添加到我的应用程序中.
任何帮助表示赞赏.
给出以下代码:
const theArray = ['Audi','Volvo','Mercedes'];
const myObj = {a: 7};
theArray.forEach((value, index, array) => {
console.log(index + ' : ' + value);
console.log(array === theArray);
console.log(this.a);
}, myObj);
Run Code Online (Sandbox Code Playgroud)
我得到以下输出:
0 : Audi
true
undefined
1 : Volvo
true
undefined
2 : Mercedes
true
undefined
Run Code Online (Sandbox Code Playgroud)
我不明白为什么this不引用myObj并返回undefined而不是7.虽然this typeof Object返回true,但我不知道它引用了哪个Object.我只知道this返回一个空对象(即{})
Node.js解释器版本是v6.2.1
V8-Engine版本为5.0.71.52
我正在创建一个主页,为此我在视口顶部放置了一个导航栏.导航栏包含按钮,用户应该将注意力从一个部分导航到另一个部分.但实际上它们位于左侧.如果有2,3,4或5+按钮,我希望它们完全是中心.整个"按钮线"应该完全居中.
或者在图片中说话:

实现这一目标的常见/可能模式是什么?
我在心中唯一的模式是宽度添加到该按钮home和ubuntu最后加margin 0 auto.
我的navigationbar.css(紫色条):
#navigationBar {
background-color:#660099;
}
.navigationButton {
background-color:transparent;
border-bottom:2px solid transparent;
display:inline-block;
cursor:pointer;
color:#ffffff;
font-family:arial;
font-size:17px;
padding:16px 31px;
text-decoration:none;
text-shadow:0px 1px 0px #2f6627;
}
.navigationButton:hover {
background-color:transparent;
border-bottom:2px solid #18ab29;
}
.navigationButton:active {
position:relative;
top:1px;
}
Run Code Online (Sandbox Code Playgroud)
我的home.html:
<!DOCTYPE html>
<html>
<head>
<title>Ubuntu</title>
<link rel="stylesheet" type="text/css" href="style/general.css" />
<link rel="stylesheet" type="text/css" href="style/navigationBar.css" />
</head>
<body>
<div id="navigationBar">
<a href="home.html" class="navigationButton">Home</a>
<a href="ubuntuOverview.html" class="navigationButton">Ubuntu</a>
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
希望有人可以帮忙!