0
Facebook을 사용하여 양식 데이터를 내 앱에 게시하려고합니다. 내 양식이 대화 상자와 통합되어 있으며 form.submit()을 사용하여 양식을 제출하고 있습니다. 내 코드를 참조하십시오. 소식 데이터는 백엔드에 표시되지 않지만 (예 : load-cargo-radio, city-id, train-id) fb_sig * 데이터는 나타납니다. 페이 스북 (Facebook)으로 양식 데이터를 게시하는 것과 관련하여주의 사항이 있는지 알고 있습니까? 감사!Facebook 양식 데이터가 백엔드에 없습니다.
참고 : 양식 작업을 위해 내 서버 도메인과 내 fb 콜백 URL을 모두 사용해 보았습니다. 둘 다 작동하지 않습니다.
<div id="action_prompt">
Loading cargo...
</div>
<fb:js_string var="fbjs_load_cargo_select">
<div id="load_cargo_select">
<form id="load_cargo_select_form" action="http://railsacrosseurope.com/turn/load_cargo_select" method="POST">
<p>Your train has stopped in the city of Arhus.</p>
<p>Arhus produces the following goods:</p>
<ul>
<li>Dairy</li>
</ul>
<p>Your train is hauling the following goods:</p>
<ul>
<li>Timber</li>
</ul>
<p>What would you like to do?</p>
<input type="radio" id="load_cargo_radio" value="1">Load new goods</input>
<input type="radio" id="load_cargo_radio" value="2">Discard existing goods</input>
<input type="hidden" id="city_id" value="3" />
<input type="hidden" id="train_id" value="15" />
<input type="submit" id="submit" value="Submit" />
</form>
</div>
</fb:js_string>
.
.
.
<script type="text/javascript">
var dialog = new Dialog().showChoice('Load Cargo', fbjs_load_cargo_select, 'Okay', 'Pass');
dialog.onconfirm = function() {
// Submit the form if it exists, then hide the dialog.
frm = document.getElementById('load_cargo_select_form');
if (frm) { frm.submit(); }
dialog.hide();
};
dialog.oncancel = function() {
form = document.getElementById('redirect_form');
form.setAction('http://apps.facebook.com/rails_across_europe/turn/move_trains_auto/');
form.submit();
}
</script>
[/code]
load_cargo_radio를 (를) 의미하지 않습니까? 텍스트에는 대시가 있지만 코드에는 밑줄이 그어져 있습니다. – seth
밑줄을 텍스트에 넣으려고했으나 이탤릭체 효과가 발생하여 대시를 사용했습니다. 그러나 그들은 동일합니다. –