0
자습서를 따르고 Trello 보드 목록에 새 카드를 만들려고합니다.Trello API 새 카드 게시 오류 - 'DOMWindow'에 'postMessage'를 실행하지 못했습니다.
나는이 튜토리얼 내가 별도의 탭에서 내 보드가 열려 https://developers.trello.com/get-started/start-building 다음 여기 https://trello.com/app-key 에서 내 키를 얻고있다. 공개 모드와 비공개 모드를 모두 시도했습니다.
그러나, 나는
을 얻고있다'DOMWindow'에 'PostMessage를'을 실행하지 못했습니다 : 수신자 윈도우의 원점 ('널과 일치하지 않습니다 제공 대상 원점 ('// 파일 ') ').
무엇이 문제 일 수 있습니까? 내가 로컬 파일 시스템에서 서버에서가 아니라 그것을 실행해야하는 problem.You을 파악
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="https://api.trello.com/1/client.js?key=MyKey"></script>
<body>
<script>
var authenticationSuccess = function() { console.log('Successful authentication'); };
var authenticationFailure = function() { console.log('Failed authentication'); };
Trello.authorize({
type: 'popup',
name: 'Getting Started Application',
scope: {
read: true,
write: true },
expiration: 'never',
success: authenticationSuccess,
error: authenticationFailure
});
var myList = 'Mylist';
var creationSuccess = function(data) {
console.log('Card created successfully. Data returned:' + JSON.stringify(data));
};
var newCard = {
name: 'New Test Card',
desc: 'This is the description of our new card.',
// Place this card at the top of our list
idList: myList,
pos: 'top'
};
Trello.post('/cards/', newCard, creationSuccess);
</script>